Hi, While iOS doesn't support flash, there is STILL no reliable way to remove Object tags from a HTML string before parsing it into a local web view. This either ends up as just a blank part of the screen or in my case it actually shows the code since for some reason the feed contains ascii code for the opening of the tag.
Search on the internet and overall consensus is that you cannot 100% reliably remove HTML tags with a regex. However that is the only method we have when dealing with iOS yet the following are not working for me.
//replaceStr = replaceStr.replace(/<h3>[\s\S]*?Related.*Videos.*\(Embedded\).*<\/h3>[\s\S]*?<ul>[\s\S]*?<\/ul>/gmi," "); replaceStr = replaceStr.replace(/\<\;\/?object(\s\w+(\=\".*\")?)*\>\;/g," "); replaceStr = replaceStr.replace(/<object\\b[^>]*>[^<]*(?:(?!<\/?object\\b)<[^<]*)*<\/object\\s*>/g," ");
The text of the feed is
<li><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="402" height="267" title="Cardiac risk assessment - Video"> <param name="movie" value="http://c.brightcove.com/services/viewer/federated_f9?isVid=0&amp;isUI=1&amp;playerID=1033065488001&amp;videoID=681437645001" /> <param name="allowfullscreen" value="True" /> <param name="wmode" value="transparent" /> <param name="swfLiveConnect" value="true" /> <param name="dynamicStreaming" value="True" /> <!--[if !IE]>--> <object type="application/x-shockwave-flash" title="Cardiac risk assessment - Video" data="http://c.brightcove.com/services/viewer/federated_f9?isVid=0&amp;isUI=1&amp;playerID=1033065488001&amp;videoID=681437645001" width="402" height="267"> <param name="allowfullscreen" value="True" /> <param name="wmode" value="transparent" /> <param name="swfLiveConnect" value="true" /> <!--<![endif]--> <p><strong>Viewing video content in NHS Choices</strong></p> <p>If you do not have a version of the Flash Player you can download the free <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Player</a> from Adobe Systems Incorporated.</p> <!--[if !IE]>--> </object> <!--<![endif]--> </object></li>
Can anyone tell me where i am going wrong? The text of the tag appears in my web view. The feed is controlled by a large company who are not going to make any changes just for me, so that option is out.
Thanks,
Your Answer
This question has been locked and cannot accept new answers.