Skip to content
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

The attached email causes a request failed message to be displayed #972

Closed
Zero3K opened this issue Feb 16, 2023 · 14 comments
Closed

The attached email causes a request failed message to be displayed #972

Zero3K opened this issue Feb 16, 2023 · 14 comments
Labels
bug Something isn't working

Comments

@Zero3K
Copy link

Zero3K commented Feb 16, 2023

subject

messages-20230216141957.zip

@the-djmaze the-djmaze added the bug Something isn't working label Feb 16, 2023
@Zero3K
Copy link
Author

Zero3K commented Feb 16, 2023

What was the issue?

@the-djmaze
Copy link
Owner

SVG elements were not stripped.
The change removes the whole SVG element tree

@Zero3K
Copy link
Author

Zero3K commented Feb 16, 2023

What is wrong with SVG elements? There should be a way to support them instead of removing them.

@the-djmaze
Copy link
Owner

When someone writes emails, they should always check what is possible.
Patreon did not check https://www.caniemail.com/features/image-svg/ and just tries.

SnappyMail removes SVG for reasons.
SnappyMail is an email application, not a website.

@Zero3K
Copy link
Author

Zero3K commented Feb 16, 2023

The majority of the webmail providers listed on it support SVG.

@the-djmaze
Copy link
Owner

But not Gmail and Gmail is big...

@Zero3K
Copy link
Author

Zero3K commented Feb 16, 2023

I think you should be better than Gmail since even other small webmail providers support it. And it will give people another reason to use a SnappyMail based provider over Gmail.

@the-djmaze
Copy link
Owner

the-djmaze commented Feb 16, 2023

HTML5, SVG, MathML, etc. etc. have many different elements and element attributes.
If we are going to support it, a whole new cleanHTML parser has to be created that keeps track of all of them.

The current purpose of cleanHTML is to support where possible, but remove security related things like javascript, tracking pixels, etc. etc.

SVG would open new security issues and needs special handling with a tree walker and more.

Why overload parsing when it is already slow in your 2MB email?
Why overload mobile browser CPU?

What if you paste an SVG in the editor but recipient can't see it?

There are just so many expectations by people who don't understand why things don't work, that it is better to not support it at all.

Same with dark mode and people sending emails with text color black but not defining background color white.
What should we do with dark text on dark background?

  • Disable dark mode?
  • Strip all colors?
  • Remove style elements?

Why should we fix screwups of others?

I use Kmail on PC in dark mode and some emails are not readable due to the mess people send to me.

Patreon could just have put the SVG as inline attachment and then an img element with a cid to that attachment and it will work.

@Zero3K
Copy link
Author

Zero3K commented Feb 16, 2023

So, I should suggest that fix to them?

@the-djmaze
Copy link
Owner

the-djmaze commented Feb 16, 2023

Sure, go ahead. Maybe they will change it.
Benefit is that the SVG can be attached compressed (.svgz)

@Zero3K
Copy link
Author

Zero3K commented Feb 16, 2023

I have messaged their Twitter account regarding it. I will let you know their response when it I get it.

@Zero3K
Copy link
Author

Zero3K commented Feb 16, 2023

Patreon could just have put the SVG as inline attachment and then an img element with a cid to that attachment and it will work.

Can it be done even though it is not using a .svg file hosted on one of their server(s)?

@the-djmaze
Copy link
Owner

Yes that would work the same.

@the-djmaze
Copy link
Owner

the-djmaze commented Feb 16, 2023

Oh here's another issue:

  1. Put an animated gif or png in your email
  2. Send it
  3. Open Outlook app on PC and see the animation doesn't work (because Outlook uses Word and not HTML as engine, and also the reason why SVG not work there).

That's why Microsoft is pushing Office365 web apps 😝

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants