I have a string containing <iframe>
tag. The string is dynamic and contains iframe like:
<iframe src="abc.com"></iframe> OR
<iframe src="abc.com"> </iframe> OR
<iframe src="abc.com"> </iframe> OR
I would like to convert > </iframe>
in to the ></iframe>
I have tried to remove the space using below code but it is not working fine.
var str = '<iframe src="abc.com"> </iframe>';
alert( str.replace("/\s/g", "") );
Please let me know if there any solution for this?