Handle <img> tag support in graphs

This commit is contained in:
Morreski
2021-06-11 11:13:13 +02:00
parent 1096d10cb4
commit cec1dc4df9
+3 -1
View File
@@ -13,7 +13,9 @@
if (!svg) {
svg = document.querySelector('#container svg');
}
const svgString = svg.outerHTML.replaceAll('<br>', '<br/>');
const svgString = svg.outerHTML
.replaceAll('<br>', '<br/>')
.replaceAll(/<img([^>]*)>/g, (m, g) => `<img ${g} />`);
return toBase64(svgString);
};