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
Email templates with <!--[if mso]>
statements are broken
#26396
Comments
For context, the actual issue I have is that some emails are received empty when viewed in Outlook for Windows. I noticed this when still receiving blank test emails even after frappe/erpnext#41168 was fixed. I noticed by chance that the same email would render properly when viewed on my phone. I then found that the same template functions perfectly well even on Outlook for Windows when it was sent from outside the Frappe environment. |
I've tracked the source of this issue all the way to here: frappe/frappe/utils/html_utils.py Lines 181 to 188 in 2c0b77b
However, any changes in this function will affect all user input HTML in Frappe. It is also called in I've read a bit more on the subject and these conditional statements are only necessary for and executed by Windows IE and Outlook. Although Outlook only accounts for 4.06% of global market share of email clients, it still has an astounding 94.5% market share within businesses. For the CRM module to be of any use for b2b users, full support for Outlook is absolutely necessary. I'm in way over my head here. @ankush @shariquerik your inputs are valuable. On a separate note, Bleach has been deprecated for over a year now. |
<!--[if mso]>
statements are broken
Somewhere between creating an email template and using it, the template is processed in such a way that comments are url-encoded. This causes complex HTML templates to break.
For example,
is converted to
Conditional statements like this are important to maintain cross-client compatibility for email templates.
In the end result, these emails are broken specifically when rendered on Outlook for Windows. Or maybe, my emails are broken in Outlook because the conditional statements here are specifically targetted towards Outlook. In either case, Outlook is still one of the leading email clients used in business settings.
The text was updated successfully, but these errors were encountered: