mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-07-10 17:26:25 +02:00
[1.6.0] Implement width/height attribute transforms with Length.php
- Also, enabled 'height' CSS attribute git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@922 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@ -11,6 +11,7 @@ require_once 'HTMLPurifier/AttrTransform/TextAlign.php';
|
||||
require_once 'HTMLPurifier/AttrTransform/BgColor.php';
|
||||
require_once 'HTMLPurifier/AttrTransform/Border.php';
|
||||
require_once 'HTMLPurifier/AttrTransform/Name.php';
|
||||
require_once 'HTMLPurifier/AttrTransform/Length.php';
|
||||
|
||||
/**
|
||||
* Proprietary module that transforms deprecated elements into Strict
|
||||
@ -24,7 +25,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', 'a');
|
||||
'blockquote', 'table', 'td', 'th', 'tr', 'img', 'a', 'hr');
|
||||
|
||||
var $info_tag_transform = array(
|
||||
// placeholders, see constructor for definitions
|
||||
@ -87,6 +88,13 @@ class HTMLPurifier_HTMLModule_TransformToStrict extends HTMLPurifier_HTMLModule
|
||||
$this->info['img']->attr_transform_pre['name'] =
|
||||
$this->info['a']->attr_transform_pre['name'] = new HTMLPurifier_AttrTransform_Name();
|
||||
|
||||
$this->info['td']->attr_transform_pre['width'] =
|
||||
$this->info['th']->attr_transform_pre['width'] =
|
||||
$this->info['hr']->attr_transform_pre['width'] = new HTMLPurifier_AttrTransform_Length('width');
|
||||
|
||||
$this->info['td']->attr_transform_pre['height'] =
|
||||
$this->info['th']->attr_transform_pre['height'] = new HTMLPurifier_AttrTransform_Length('height');
|
||||
|
||||
}
|
||||
|
||||
var $defines_child_def = true;
|
||||
|
Reference in New Issue
Block a user