iamcal.com

« Code Homepage

lib_filter - An HTML filtering library in PHP

By Cal Henderson

This PHP library allows you to accept HTML input from your users, filter it to make sure it contains only an allowed set of tags, attributes and values and then display it without leaving yourself open to XSS holes.

You can read about the basis of this code in PHP : Processing HTML and again in part 2.

gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.