Home » HTML » HTML_Safe » Bug #7027
Whitelisting of HTML elements
Details
| Request #7027 | Whitelisting of HTML elements |
|---|---|
| Submitted | 2006-03-05 22:28 UTC |
| From | matslin-php at orakel dot ntnu dot no |
| Assigned | demrit |
| Status | Closed |
| Package | HTML_Safe |
| PHP Version | 4.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');