PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

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');