Skip to content

kartikeyap/lib_filter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lib_filter

Build Status

A PHP HTML-input-filtering library. You can read about how it works in this article (part 2).

Usage

This library can be used to filter HTML directly entered by users, or recieved via a richtext editor. The library ensures that no harmful HTML will be output into the browser, avoiding all forms of XSS attacks.

include('lib_filter.php');

$filter = new lib_filter();

$safe_html = $filter->go($user_input);

echo $safe_html;

Legacy

This library has been used in many projects and frameworks, ported to other languages and used as the basis for other filtering libraries. For instance:

Testing

If you have perl's Test::Harness installed (you almost certainly do), you can run the tests using:

make test

When submitting patches or pull-requests, bonus points are given for adding test cases.

About

PHP HTML filtering library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 64.7%
  • Other 33.6%
  • Perl 1.5%
  • Makefile 0.2%