PHP Classes

allowHTML: Filter insecure HTML following OWASP AntiSamy

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 56%Total: 796 All time: 4,299 This week: 488Up
Version License PHP version Categories
allowhtml 1.0.0BSD License5HTML, Validation, Security
Description 

Author

This class can be used to filter insecure HTML following OWASP AntiSamy rules.

It can parse HTML documents using DOM document objects and then remove unsafe tags, attributes and CSS parameters.

It uses a configurable whitelist to determine which tags, attributes and CSS style parameters are allowed.

The class may also apply filtering rules defined in a separate AntiSamy XML rules file.

Innovation Award
PHP Programming Innovation award nominee
December 2010
Number 9
AntiSamy is a project of OWASP to define rules that secure applications must apply to HTML in order to filter insecure tags.

This class is secure HTML filter that can apply OWASP AntiSamy rules.

Manuel Lemos
Picture of Simon Emery
Name: Simon Emery <contact>
Classes: 1 package by
Country: United Kingdom
Age: ???
All time rank: 2661122 in United Kingdom
Week rank: 197 Up9 in United Kingdom Up
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files (3)  
File Role Description
Files folder imageexample (1 file)
Files folder imagexml (1 file)
Plain text file allowHTML.php Class Main class

  Files folder image Files (3)  /  example  
File Role Description
  Accessible without login Plain text file example.php Example Example of class usage

  Files folder image Files (3)  /  xml  
File Role Description
  Plain text file antisamy.xml Aux. Anti-Samy XML policy file

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:796
This week:0
All time:4,299
This week:488Up
 User Ratings  
 
 All time
Utility:81%StarStarStarStarStar
Consistency:81%StarStarStarStarStar
Documentation:-
Examples:81%StarStarStarStarStar
Tests:-
Videos:-
Overall:56%StarStarStar
Rank:1733