Skip to content

Fix SVG namespace prefixes in HTML emails with attachments#170

Open
awdeorio wants to merge 4 commits into
developfrom
issue165
Open

Fix SVG namespace prefixes in HTML emails with attachments#170
awdeorio wants to merge 4 commits into
developfrom
issue165

Conversation

@awdeorio
Copy link
Copy Markdown
Owner

@awdeorio awdeorio commented Jan 14, 2026

Fix issue where inline SVG elements get namespace prefixes (e.g., ns0:svg) when an HTML email template has attachments.

The solution is to replace ElementTree.tostring() with html5lib.serialize() which properly handles HTML5 SVG namespaces. Add regression test for the fix.

Fixes #165

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.74%. Comparing base (f437d83) to head (6c724e5).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #170      +/-   ##
===========================================
- Coverage    99.74%   99.74%   -0.01%     
===========================================
  Files            5        5              
  Lines          399      398       -1     
===========================================
- Hits           398      397       -1     
  Misses           1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@awdeorio
Copy link
Copy Markdown
Owner Author

@jmacdone I think this addresses your issue. If you have a moment to take look, that would be nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Better way to handle inline SVG?

1 participant