1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-02 04:10:25 +02:00

[1.6.0] Add support for name transformation to id

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@921 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2007-03-29 23:19:53 +00:00
parent 85374d330f
commit 1102dc6e27
7 changed files with 75 additions and 3 deletions

View File

@@ -10,6 +10,7 @@ require_once 'HTMLPurifier/AttrTransform/Lang.php';
require_once 'HTMLPurifier/AttrTransform/TextAlign.php';
require_once 'HTMLPurifier/AttrTransform/BgColor.php';
require_once 'HTMLPurifier/AttrTransform/Border.php';
require_once 'HTMLPurifier/AttrTransform/Name.php';
/**
* Proprietary module that transforms deprecated elements into Strict
@@ -23,7 +24,7 @@ class HTMLPurifier_HTMLModule_TransformToStrict extends HTMLPurifier_HTMLModule
// we're actually modifying these elements, not defining them
var $elements = array('h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p',
'blockquote', 'table', 'td', 'th', 'tr', 'img');
'blockquote', 'table', 'td', 'th', 'tr', 'img', 'a');
var $info_tag_transform = array(
// placeholders, see constructor for definitions
@@ -83,6 +84,9 @@ class HTMLPurifier_HTMLModule_TransformToStrict extends HTMLPurifier_HTMLModule
$this->info['img']->attr_transform_pre['border'] = new HTMLPurifier_AttrTransform_Border();
$this->info['img']->attr_transform_pre['name'] =
$this->info['a']->attr_transform_pre['name'] = new HTMLPurifier_AttrTransform_Name();
}
var $defines_child_def = true;