I have the following inline code:
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
....
<svg width="1152" height="648" viewBox="0 0 1152 648" aria-describedby="title" id="svg">
<title id="title">Supporter Plan</title>
<image xlink:href="../images/Image1.png" x="0" y="0" width="100%" height="100%"></image>
<image xlink:href="../images/Image2.png" x="0" y="0" width="100%" height="100%"></image>
<foreignobject x="190" y="177" width="811" height="373">
<body xmlns="http://www.w3.org/1999/xhtml">
<iframe style="border: none" src="../fo.html" scrolling="no" width="100%" height="100%">
</iframe>
</body>
</foreignobject>
</svg>
...
</body>
</html>
I want to save the created image as a file. However, if I save it by creatig a link var url = "data:image/svg+xml;charset=utf-8,"+encodeURIComponent(source);
where source
is the svg content with the needed headers, the created file doesn't evaluate the images nor the iframe.
How can I solve this?