Cookie Into the (open) source


HTML Purifier per “purify” HTML l'


This article was written in the 2011, there may have been some developments in the subject matter.
If in doubt please leave a comment in the bottom of the article.

Today we see a small program in PHP ready to use and is well suited to any of our web pages. It is HTML Purifier a common libreria PHP, that cleans up the HTML dates of the pages by removing all tag e i markup unnecessary, that often weigh down the page. Also makes the code of our pages secure (I'm thinking about dynamic sites: WordPress, Joomla, Drupal, etc..) contrasting effectively XSS attacks (Cross-site scripting).

For those who want to use HTML Purifier hand operation is more than obvious; downloaded and extracted the package we give write permissions the folder /HTMLPurifier/DefinitionCache/Serializer:

chmod 755 /HTMLPurifier/DefinitionCache/Serializer

Now recall the library within the page in which we want to use

require_once ''

At this point, if properly configured script, the library will be able to parse the pages and return results "filtered".

But there are shortcuts for those who use the CMS:

Maybe slow down a bit 'on page load, but it's a risk I'm willing to take if the offset is greater safety.


I keep this blog as a hobby by 2009. I am passionate about graphic, technology, software Open Source. Among my articles will be easy to find music, and some personal thoughts, but I prefer the direct line of the blog mainly to technology. For more information contact me.

Comments (0) Trackbacks (0)

No comments yet.

Leave a comment

No trackbacks yet.