News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Gareth Heyes' Blog:
htmlentities is badly designed
November 26, 2007 @ 10:23:00

Gareth Heyes has a quick new post to his blog today about the use of htmlentities and the false assumptions some developers have about it:

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.

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.

0 comments voice your opinion now!
htmlentities design quote xss injection entquotes encoding htmlentities design quote xss injection entquotes encoding


blog comments powered by Disqus

Similar Posts

GoodPHPTutorials.com: SQL Injections in PHP with MySQL

DevShed: Using the Memento Pattern with a File Reading Class

Paul Jones' Blog: Dependency Injection in Solar

Padraic Brady's Blog: Zend Framework 2.0: Dependency Injection (Part 1)

Giorgio Sironi's Blog: Never write the same code twice: Dependency Injection


Community Events

Don't see your event here?
Let us know!


install language community application opinion conference configure api symfony2 series interview podcast part2 example performance release laravel introduction framework php7

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework