You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
seems this is not enough to catch this case.
I suspect it tries to open it via the email:// scheme, so we might need to check if it is a domain that is tried to be opened instead of index.html.
concerns:
we might need to expand the function in the future to load embedded images/media from the email in some edge cases? maybe?
it might be too late when we get the call to the link in the email scheme handler, the user might already get a white/blank screen and we can not reject the request?
last resort could be to modify the html to fix those <a href= links, to add https-scheme, but not sure we want that, could lead to more edge cases/bugs.
If you want or need dev tools for the email content add this to the code in html_email.ts.
sandboxedView.webContents.openDevTools()
The text was updated successfully, but these errors were encountered:
More specifically, links without a schema, like
academy.qt.io/enrollments
Expected: Open link in system browser
Actual: Opening opens a blank page in the html viewer.
Tracking down the problem & Solution ideas
Foundation knowledge
The html email window has two parts: the ui and a sandboxed browser view with disable JS in which the html email is loaded.
Email source is loaded from the
email://
scheme that is implemented indeltachat-desktop/src/main/windows/html_email.ts
Lines 412 to 420 in ba6534b
The http/s handlers are overwritten by handlers that call the http request method of DC core, if
allow_remote_content
is activated.Then there is link handling:
deltachat-desktop/src/main/windows/html_email.ts
Lines 472 to 493 in ba6534b
This
openLink
function is called in two cases:sandboxedView.webContents.on( 'will-navigate', ...
sourcesandboxedView.webContents.setWindowOpenHandler(details => { ...
sourceseems this is not enough to catch this case.
I suspect it tries to open it via the
email://
scheme, so we might need to check if it is a domain that is tried to be opened instead of index.html.concerns:
<a href=
links, to addhttps
-scheme, but not sure we want that, could lead to more edge cases/bugs.If you want or need dev tools for the email content add this to the code in
html_email.ts
.The text was updated successfully, but these errors were encountered: