Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
148545 | Oct 24,2019 10:06 AM UTC | Nov 6,2019 04:21 AM UTC | Angular - EJ 2 | 8 |
![]() |
Tags: Diagram |
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>');
} |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.