Cookie

Caution


This article was published more than a year ago, there may have been developments.
Please take this into account.

Today we see a small program in PHP on that adapts well 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 the page where we want to use

require_once 'HTMLPurifier.auto.php'

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 a little slow’ the load of the page, but it's a risk I'm willing to take if the offset is greater safety.

Not enough?


TheJoe

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.