-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some emails are showing just plain html instead of text #2099
Comments
It's possible this problem only occurs when sending html email from browser extension in particular (only supported on Firefox, like this) Because the format is not entirely correct. Maybe it works ok for HTML emails from other clients? (can check from flowcrypt.compatibility account later). If that is true, then the problem is only in recognizing it as a HTML message and treating it as such. We already had ability to parse and render HTML emails as text, to my knowledge. |
In either case, we already support rendering regular HTML emails as text, at the least, so we do have the functionality available to do this relatively easily. |
It happens not for FlowCrypt emails, but for some usual messages - for example, html isn't rendered for emails from reddit and for some email confirmation messages. I noticed that they start with such doctype: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/ xhtml1-strict.dtd">
<html xmIns="http://www.w3.org/1999/xhtm|"
... While other html messages work well - showing plain text extracted from html. |
Ah. That must have been broken relatively recently. |
Or, it never worked for some types of html emails. Please if you could, try adding a sample to flowcrypt.compatibility email and mention the subject here, to later have it ready as a sample. |
I think it was broken initially, as we didn't have any changes for html rendering recently. |
@ioanmo226 I sent you example message which fails to render correctly on iOS |
Example message is in |
Aha, I see. Sorry for confusion |
Yeah, probably my email text wasn't very clear :) |
@sosnovsky Upon checking, I found that the NSAttributedString initializer doesn't recognize the I can suggest 2 potential solutions for this issue: Which option would you prefer? |
Looks like these libraries are not actively developed, so it'll be risky to be dependent on them for rendering messages.
We'll probably start using webview in the future, to be able to render html emails, not only plain text, but it'll be a bigger feature, here I thought it will be just a small fix. Maybe we can just update doctype or replace |
I see.
|
* fix: email showing as plain html issue * fix: decrypt issue * fix: text * fix: ui test * fix: pr reviews * fix: pr reviews * fix: email showing as platin text issue * simplify * fix: pr review * fix: pr reviews
Currently app should strip html code and render just plain text for html emails. But it fails for some emails and showing just plain html, which makes it quite difficult to read message content.
The text was updated successfully, but these errors were encountered: