Hello SyncFusion Team,
chrome | firefox | |
So removal of the <svg> tags poses another problem for us.
The same SVG file is being loaded elsewhere in our app using <img src="path to svg file"> (which uses content-type: image/svg+xml). This stops working if we remove the <svg> tags.
Directly embedding the SVG inline in HTML is also not an option for us (long story: the SVG content becomes available to the app long after the page has been rendered).
Any suggested workarounds?
We'd like to reuse the same SVGs in both scenarios:
Thanks,
Mithun
public removeSvgTag(str)
{
if ((str===null) || (str===''))
return '';
else
str = str.toString();
return str.replace(/(<svg|<\svg>)([^<]*|[^>]*)/g, '<g>');
} |