<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Strip Html Tags &#8211; with allowable tags</title>
	<atom:link href="http://www.flexer.info/2008/04/08/strip-html-tags-with-allowable-tags/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.flexer.info/2008/04/08/strip-html-tags-with-allowable-tags/</link>
	<description>flex developers web corner</description>
	<lastBuildDate>Wed, 18 Jan 2012 13:28:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Valdemar</title>
		<link>http://www.flexer.info/2008/04/08/strip-html-tags-with-allowable-tags/comment-page-1/#comment-2065</link>
		<dc:creator>Valdemar</dc:creator>
		<pubDate>Thu, 10 Nov 2011 18:29:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.flexer.info/?p=130#comment-2065</guid>
		<description>Great! very useful, thank you!</description>
		<content:encoded><![CDATA[<p>Great! very useful, thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: al</title>
		<link>http://www.flexer.info/2008/04/08/strip-html-tags-with-allowable-tags/comment-page-1/#comment-2061</link>
		<dc:creator>al</dc:creator>
		<pubDate>Wed, 26 Oct 2011 07:48:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.flexer.info/?p=130#comment-2061</guid>
		<description>var tmpRE:RegExp = new RegExp(&quot;([\+\*\$\/])&quot;,&quot;g&quot;);

u might wanna add &quot;(&quot; and &quot;)&quot; in there.

var tmpRE:RegExp = new RegExp(&quot;([\+\*\$\/\(\)])&quot;,&quot;g&quot;);</description>
		<content:encoded><![CDATA[<p>var tmpRE:RegExp = new RegExp(&#8220;([\+\*\$\/])&#8221;,&#8221;g&#8221;);</p>
<p>u might wanna add &#8220;(&#8221; and &#8220;)&#8221; in there.</p>
<p>var tmpRE:RegExp = new RegExp(&#8220;([\+\*\$\/\(\)])&#8221;,&#8221;g&#8221;);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nuwan</title>
		<link>http://www.flexer.info/2008/04/08/strip-html-tags-with-allowable-tags/comment-page-1/#comment-2059</link>
		<dc:creator>Nuwan</dc:creator>
		<pubDate>Mon, 24 Oct 2011 16:15:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.flexer.info/?p=130#comment-2059</guid>
		<description>Thanks was very helpful!!!</description>
		<content:encoded><![CDATA[<p>Thanks was very helpful!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PaulTheLad</title>
		<link>http://www.flexer.info/2008/04/08/strip-html-tags-with-allowable-tags/comment-page-1/#comment-1904</link>
		<dc:creator>PaulTheLad</dc:creator>
		<pubDate>Wed, 19 May 2010 18:39:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.flexer.info/?p=130#comment-1904</guid>
		<description>Hey Andrei, nice article, can you tell me where to get the updated code with the fixes that you made over time as folks commented upon the original code?</description>
		<content:encoded><![CDATA[<p>Hey Andrei, nice article, can you tell me where to get the updated code with the fixes that you made over time as folks commented upon the original code?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://www.flexer.info/2008/04/08/strip-html-tags-with-allowable-tags/comment-page-1/#comment-1866</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Mon, 19 Apr 2010 17:45:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.flexer.info/?p=130#comment-1866</guid>
		<description>I haven&#039;t found the problem yet, but when i run this with any html containing a tag with associated attribute style=&quot;etc.; etc.; color: rgb(#,#,#); etc.; etc.&quot; it won&#039;t remove that tag. for instance, the following is never removed (even when I used the RegExp &quot;]*&gt;&quot;:



This has happened with , , and &lt;a&gt;, I haven&#039;t tried it with others yet. As far as I can tell, the color attribute is the only similarity

Thoughts? Ideas? This is killing me.</description>
		<content:encoded><![CDATA[<p>I haven&#8217;t found the problem yet, but when i run this with any html containing a tag with associated attribute style=&#8221;etc.; etc.; color: rgb(#,#,#); etc.; etc.&#8221; it won&#8217;t remove that tag. for instance, the following is never removed (even when I used the RegExp &#8220;]*&gt;&#8221;:</p>
<p>This has happened with , , and <a>, I haven&#8217;t tried it with others yet. As far as I can tell, the color attribute is the only similarity</p>
<p>Thoughts? Ideas? This is killing me.</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrei Ionescu</title>
		<link>http://www.flexer.info/2008/04/08/strip-html-tags-with-allowable-tags/comment-page-1/#comment-1814</link>
		<dc:creator>Andrei Ionescu</dc:creator>
		<pubDate>Sun, 07 Feb 2010 20:23:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.flexer.info/?p=130#comment-1814</guid>
		<description>Thanks for your fix. Jörg. You mean line 58 in the whole source file but I guess it is line 36 in the code presented in the article.</description>
		<content:encoded><![CDATA[<p>Thanks for your fix. Jörg. You mean line 58 in the whole source file but I guess it is line 36 in the code presented in the article.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jörg</title>
		<link>http://www.flexer.info/2008/04/08/strip-html-tags-with-allowable-tags/comment-page-1/#comment-1812</link>
		<dc:creator>Jörg</dc:creator>
		<pubDate>Sat, 06 Feb 2010 22:39:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.flexer.info/?p=130#comment-1812</guid>
		<description>Got it: replace line 58 with this
&lt;pre lang=&quot;actionscript&quot;&gt;var tmpRE:RegExp = new RegExp(&quot;([\+\*\$\/\?])&quot;,&quot;g&quot;);&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Got it: replace line 58 with this</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> tmpRE:RegExp = <span style="color: #000000; font-weight: bold;">new</span> RegExp<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;([<span style="color: #000099; font-weight: bold;">\+</span><span style="color: #000099; font-weight: bold;">\*</span><span style="color: #000099; font-weight: bold;">\$</span><span style="color: #000099; font-weight: bold;">\/</span><span style="color: #000099; font-weight: bold;">\?</span>])&quot;</span>,<span style="color: #ff0000;">&quot;g&quot;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: Jörg</title>
		<link>http://www.flexer.info/2008/04/08/strip-html-tags-with-allowable-tags/comment-page-1/#comment-1810</link>
		<dc:creator>Jörg</dc:creator>
		<pubDate>Sat, 06 Feb 2010 22:29:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.flexer.info/?p=130#comment-1810</guid>
		<description>Hi!
I found a strange behaviour in the code:

If you try to strip the &#039;a&#039; tags in the following String
&lt;pre&gt;
&lt;a href=&#039;http://google.com/?i&#039; rel=&quot;nofollow&quot;&gt;google.com/?i&lt;/a&gt;
&lt;/pre&gt;
you will get
&lt;pre&gt;
&lt;a HREF=&quot;http://google.com/?i&quot; rel=&quot;nofollow&quot;&gt;google.com/?ig
&lt;/pre&gt;

It&#039;s because of the &quot;?&quot; character I think, but so far I have no solution for it. I will post back if I find one.

Cheers</description>
		<content:encoded><![CDATA[<p>Hi!<br />
I found a strange behaviour in the code:</p>
<p>If you try to strip the &#8216;a&#8217; tags in the following String</p>
<pre>
&lt;a href='http://google.com/?i' rel="nofollow"&gt;google.com/?i&lt;/a&gt;
</pre>
<p>you will get</p>
<pre>
&lt;a HREF="http://google.com/?i" rel="nofollow"&gt;google.com/?ig
</pre>
<p>It&#8217;s because of the &#8220;?&#8221; character I think, but so far I have no solution for it. I will post back if I find one.</p>
<p>Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yoav</title>
		<link>http://www.flexer.info/2008/04/08/strip-html-tags-with-allowable-tags/comment-page-1/#comment-1792</link>
		<dc:creator>yoav</dc:creator>
		<pubDate>Sat, 23 Jan 2010 21:04:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.flexer.info/?p=130#comment-1792</guid>
		<description>Glad I could help evolve it. The changes you made are great because it lets you specify p as an allowable tag while using attributes like style=&quot;color:#0000FF;&quot;, but in the specific application I&#039;m using it in I need stricter control. I can&#039;t reproduce the closing tags not being removed issue though. 

My changes still work for me in cases where you just want certain bare tags to get through. I guess it depends on the situation. Thanks for letting me know, also the working example you posted is very useful.</description>
		<content:encoded><![CDATA[<p>Glad I could help evolve it. The changes you made are great because it lets you specify p as an allowable tag while using attributes like style=&#8221;color:#0000FF;&#8221;, but in the specific application I&#8217;m using it in I need stricter control. I can&#8217;t reproduce the closing tags not being removed issue though. </p>
<p>My changes still work for me in cases where you just want certain bare tags to get through. I guess it depends on the situation. Thanks for letting me know, also the working example you posted is very useful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrei Ionescu</title>
		<link>http://www.flexer.info/2008/04/08/strip-html-tags-with-allowable-tags/comment-page-1/#comment-1791</link>
		<dc:creator>Andrei Ionescu</dc:creator>
		<pubDate>Sat, 23 Jan 2010 17:43:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.flexer.info/?p=130#comment-1791</guid>
		<description>Hello Yoav! Just fIxed my code and created a working application. Tested your solution and found that sometimes it doesn&#039;t remove the closing tags (&lt;/iframe&gt;, for example). So I found another better way fixing the bug you discovered. Thank you very much for your real help.</description>
		<content:encoded><![CDATA[<p>Hello Yoav! Just fIxed my code and created a working application. Tested your solution and found that sometimes it doesn&#8217;t remove the closing tags (&lt;/iframe&gt;, for example). So I found another better way fixing the bug you discovered. Thank you very much for your real help.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

