PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » HTML » HTML_Safe » Bug #7027

Whitelisting of HTML elements

Details

Request #7027Whitelisting of HTML elements
Submitted2006-03-05 22:28 UTC
Frommatslin-php at orakel dot ntnu dot no
Assigneddemrit
StatusClosed
PackageHTML_Safe
PHP Version4.3.11/5.2+
OS--
Roadmaps(Not assigned)

Comments

[2006-03-05 22:28 UTC] matslin-php at orakel dot ntnu dot no

Description:
------------
A small patch to allow whitelisting of HTML element names instead of blacklisting.

diff:
http://docs.e-mats.org/HTML_Safe.2006-03-05.diff

Default Elements should probably be tweaked.

Test script:
---------------
$html_safe->allowedTagsOnly = true;
$html_safe->allowedTags = array('a', 'img', 'ul', 'li');