Issues generating HTML with SVG content

Hi community,

I’m running into a strange problem when adding SVG code to an HTML template using the HTML node.

I have 3 SVG files which are QR codes.

https://pastebin.com/4Nwd8DmF
https://pastebin.com/dhUXxYGr
https://pastebin.com/1qmxR0xu

When I add the code to an HTML template, I can see 3 QR codes, only it is 3 times the third one.

However, when I replace the SVGs with a very simple code like the one below, changing only the fill color each time to see the difference, it works fine.

<svg width="400" height="200" xmlns="http://www.w3.org/2000/svg"><rect width="200" height="100" x="100" y="50" rx="20" ry="20" fill="blue" /></svg>

I tried “sanitizing” the SVGs using different websites, but it made no difference.

Could it be that the HTML node doesn’t support complex SVGs? Anyone who can replicate this?

I’m currently running a self-hosted n8n v1.27.2 instance using Docker.

Thanks in advance!

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hey @tvdp,

Can you share an example workflow that reproduces the issue? It will same some guessing on how you are adding the svgs.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.