thunderbird-android icon indicating copy to clipboard operation
thunderbird-android copied to clipboard

Add support for embedded SVG data

Open desbma opened this issue 7 years ago • 7 comments
trafficstars

It would be a great addition to support the SVG image format in HTML emails. It's useful for example to display dense graphs, that can be zoomed without losing quality compared to traditional raster image formats like PNG.

Example of email clients that support it :

  • Aqua Mail (Android)
  • Thunderbird (desktop)

I know the following client do NOT support it:

  • Gmail (webmail)
  • Gmail (android)

desbma avatar May 26 '18 10:05 desbma

Can you provide a sample message that contains a SVG image?

cketti avatar Mar 08 '19 02:03 cketti

Unfortunately, emails contain personal addresses that I'd rather not share. However I can provide the HTML code for an email with embedded SVG, would that be enough for you to test?

desbma avatar Mar 08 '19 23:03 desbma

Sure.

cketti avatar Mar 08 '19 23:03 cketti

Here is one from an email generated by sysstat_mail_report,, using Gnuplot: https://pastebin.com/raw/h3226WaQ

Of course, you can open the HTML in a browser too

desbma avatar Mar 09 '19 00:03 desbma

Developer note: The feature request is about embedded SVG data.

<html>
  <head></head>
  <body>
    <svg xmlns="http://www.w3.org/2000/svg" xmlns:ns1="http://www.w3.org/1999/xlink" height="400" viewBox="0 0 780 400" width="780">
      …
    </svg>
  </body>
</html>

WebView should be able to display this just fine. But currently it's most likely not getting past HtmlSanitizer.

cketti avatar Mar 09 '19 02:03 cketti

Probably fixed by #7737?

strugee avatar May 23 '25 03:05 strugee

Likely, though I suspect this could also be done by allowing svg in the html sanitizier, and reviewing what security risks SVGs have and how to limit what they can do.

kewisch avatar May 23 '25 11:05 kewisch