<?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: Create a Simple Input Sanitation Function With PHP.</title>
	<atom:link href="http://dev-tips.com/featured/create-a-simple-input-sanitation-function-with-php/feed" rel="self" type="application/rss+xml" />
	<link>http://dev-tips.com/featured/create-a-simple-input-sanitation-function-with-php</link>
	<description>Become a Better Developer, One Tip at a Time.</description>
	<lastBuildDate>Tue, 27 Sep 2011 18:42:19 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: Solo</title>
		<link>http://dev-tips.com/featured/create-a-simple-input-sanitation-function-with-php#comment-1929</link>
		<dc:creator>Solo</dc:creator>
		<pubDate>Sat, 27 Nov 2010 20:22:44 +0000</pubDate>
		<guid isPermaLink="false">http://dev-tips.com/?p=379#comment-1929</guid>
		<description>so, why no mysql_real_escape_string use at all??</description>
		<content:encoded><![CDATA[<p>so, why no mysql_real_escape_string use at all??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dESiGNERz BLOG &#187; 120 Tips, Tricks, and Tuts from 2009 Worth your Time</title>
		<link>http://dev-tips.com/featured/create-a-simple-input-sanitation-function-with-php#comment-1567</link>
		<dc:creator>dESiGNERz BLOG &#187; 120 Tips, Tricks, and Tuts from 2009 Worth your Time</dc:creator>
		<pubDate>Thu, 21 Jan 2010 17:23:31 +0000</pubDate>
		<guid isPermaLink="false">http://dev-tips.com/?p=379#comment-1567</guid>
		<description>[...] Create a Simple Input Sanitation Function With PHP [...]</description>
		<content:encoded><![CDATA[<p>[...] Create a Simple Input Sanitation Function With PHP [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 120 Tips, Tricks, and Tuts from 2009 Worth your Time &#124; Tutorial51</title>
		<link>http://dev-tips.com/featured/create-a-simple-input-sanitation-function-with-php#comment-1261</link>
		<dc:creator>120 Tips, Tricks, and Tuts from 2009 Worth your Time &#124; Tutorial51</dc:creator>
		<pubDate>Tue, 29 Dec 2009 11:52:14 +0000</pubDate>
		<guid isPermaLink="false">http://dev-tips.com/?p=379#comment-1261</guid>
		<description>[...] Create a Simple Input Sanitation Function With PHP [...]</description>
		<content:encoded><![CDATA[<p>[...] Create a Simple Input Sanitation Function With PHP [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neil Skoglund &#187; Blog Archive &#187; 120 Tips, Tricks, and Tuts from 2009 Worth your Time</title>
		<link>http://dev-tips.com/featured/create-a-simple-input-sanitation-function-with-php#comment-1256</link>
		<dc:creator>Neil Skoglund &#187; Blog Archive &#187; 120 Tips, Tricks, and Tuts from 2009 Worth your Time</dc:creator>
		<pubDate>Tue, 29 Dec 2009 02:24:05 +0000</pubDate>
		<guid isPermaLink="false">http://dev-tips.com/?p=379#comment-1256</guid>
		<description>[...] Create a Simple Input Sanitation Function With PHP [...]</description>
		<content:encoded><![CDATA[<p>[...] Create a Simple Input Sanitation Function With PHP [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Apathy</title>
		<link>http://dev-tips.com/featured/create-a-simple-input-sanitation-function-with-php#comment-722</link>
		<dc:creator>Apathy</dc:creator>
		<pubDate>Mon, 11 May 2009 18:06:39 +0000</pubDate>
		<guid isPermaLink="false">http://dev-tips.com/?p=379#comment-722</guid>
		<description>Right. First off empty() is a really bad choice here, since the function returns false if empty() evaluates to true, and since $num = 0; will make empty($num) return 0, well, you get the point. You&#039;re better of with using $str != &quot;&quot;.

Also, you should be consistent with the syntax of the if and else-clauses by always using {} for increased readability.

Regarding arrays I recommend you taking a look at array_map, which is a really handy function, and will probably save some work with writing array-compatible code.</description>
		<content:encoded><![CDATA[<p>Right. First off empty() is a really bad choice here, since the function returns false if empty() evaluates to true, and since $num = 0; will make empty($num) return 0, well, you get the point. You&#8217;re better of with using $str != &#8220;&#8221;.</p>
<p>Also, you should be consistent with the syntax of the if and else-clauses by always using {} for increased readability.</p>
<p>Regarding arrays I recommend you taking a look at array_map, which is a really handy function, and will probably save some work with writing array-compatible code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vasili</title>
		<link>http://dev-tips.com/featured/create-a-simple-input-sanitation-function-with-php#comment-674</link>
		<dc:creator>Vasili</dc:creator>
		<pubDate>Sun, 03 May 2009 21:21:31 +0000</pubDate>
		<guid isPermaLink="false">http://dev-tips.com/?p=379#comment-674</guid>
		<description>I don&#039;t understand what you mean.. If you mean stripping the content between the tags, then no; it just removes the tags (and whatever is in them, ie. attributes).</description>
		<content:encoded><![CDATA[<p>I don&#8217;t understand what you mean.. If you mean stripping the content between the tags, then no; it just removes the tags (and whatever is in them, ie. attributes).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sumit</title>
		<link>http://dev-tips.com/featured/create-a-simple-input-sanitation-function-with-php#comment-665</link>
		<dc:creator>sumit</dc:creator>
		<pubDate>Sun, 03 May 2009 18:09:24 +0000</pubDate>
		<guid isPermaLink="false">http://dev-tips.com/?p=379#comment-665</guid>
		<description>does this work for the items between the  tags?</description>
		<content:encoded><![CDATA[<p>does this work for the items between the  tags?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vasili</title>
		<link>http://dev-tips.com/featured/create-a-simple-input-sanitation-function-with-php#comment-662</link>
		<dc:creator>Vasili</dc:creator>
		<pubDate>Sun, 03 May 2009 16:36:15 +0000</pubDate>
		<guid isPermaLink="false">http://dev-tips.com/?p=379#comment-662</guid>
		<description>Well, usually if you&#039;re trying to strip links you aren&#039;t going to strip some depending on attributes - at least I don&#039;t. As for XSS, I have a completely different function to check for XSS.

Thanks for the comment. :)</description>
		<content:encoded><![CDATA[<p>Well, usually if you&#8217;re trying to strip links you aren&#8217;t going to strip some depending on attributes &#8211; at least I don&#8217;t. As for XSS, I have a completely different function to check for XSS.</p>
<p>Thanks for the comment. <img src='http://dev-tips.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shawn Stratton</title>
		<link>http://dev-tips.com/featured/create-a-simple-input-sanitation-function-with-php#comment-661</link>
		<dc:creator>Shawn Stratton</dc:creator>
		<pubDate>Sun, 03 May 2009 16:28:39 +0000</pubDate>
		<guid isPermaLink="false">http://dev-tips.com/?p=379#comment-661</guid>
		<description>The only problem I&#039;m noticing is your regex use with strip tags, the regex fails if there are attributes with the tag and striptags has some issues with said attributes as well.  Also this will not protect you against XSS if any of the values you&#039;re using wind up inside of a .  Otherwise good work.</description>
		<content:encoded><![CDATA[<p>The only problem I&#8217;m noticing is your regex use with strip tags, the regex fails if there are attributes with the tag and striptags has some issues with said attributes as well.  Also this will not protect you against XSS if any of the values you&#8217;re using wind up inside of a .  Otherwise good work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Drew Douglass</title>
		<link>http://dev-tips.com/featured/create-a-simple-input-sanitation-function-with-php#comment-653</link>
		<dc:creator>Drew Douglass</dc:creator>
		<pubDate>Sun, 03 May 2009 04:36:55 +0000</pubDate>
		<guid isPermaLink="false">http://dev-tips.com/?p=379#comment-653</guid>
		<description>Great article Vasili, simple and effective. 

I&#039;m personally a fan of always using curly brackets, but in this situation, it&#039;s just a matter of preference I suppose :)

Hope to see more like this from you.</description>
		<content:encoded><![CDATA[<p>Great article Vasili, simple and effective. </p>
<p>I&#8217;m personally a fan of always using curly brackets, but in this situation, it&#8217;s just a matter of preference I suppose <img src='http://dev-tips.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Hope to see more like this from you.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

