<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Wed, 23 May 2012 04:04:18 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Gareth Heyes' Blog: htmlentities is badly designed]]></title>
      <guid>http://www.phpdeveloper.org/news/9113</guid>
      <link>http://www.phpdeveloper.org/news/9113</link>
      <description><![CDATA[<p>
<i>Gareth Heyes</i> has a <a href="http://www.thespanner.co.uk/2007/11/26/htmlentities-is-badly-designed/">quick new post</a> to his blog today about the use of <a href="http://php.net/htmlentities">htmlentities</a> and the false assumptions some developers have about it:
</p>
<blockquote>
When someone uses htmlentities I've seen it time and time again that they expect that it filters variables from all XSS. This is wrong of course because the function requires a second parameter ENT_QUOTES which correctly replaces quote characters. Some developers aren't even aware that quotes can lead to XSS injection.
</blockquote>
<p>
He reminds developers of the second parameter - the ENT_QUOTES parameter that correctly replaces quotes. Other people have mentions things in the comments as well like another optional parameter to force an encoding type and opinions about the function's use.
</p>]]></description>
      <pubDate>Mon, 26 Nov 2007 10:23:00 -0600</pubDate>
    </item>
  </channel>
</rss>

