diff --git a/NEWS b/NEWS
index f1fc9bb9..d7ae22f5 100644
--- a/NEWS
+++ b/NEWS
@@ -19,6 +19,7 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier
images will hang around with an empty src
! Support for more deprecated attributes via transformations:
+ hspace and vspace in img
+ + size in hr
! target attribute in a tag supported, use %Attr.AllowedFrameTargets
to enable
- Possibly fatal bug with __autoload() fixed in module manager
diff --git a/TODO b/TODO
index f4a85999..78f30a7f 100644
--- a/TODO
+++ b/TODO
@@ -9,7 +9,7 @@ TODO List
1.6.1 [Oh Dear, We Missed Something!]
# align in img and table
- # noshade and size in hr
+ # noshade in hr
1.7 release [Advanced API]
# Complete advanced API, and fully document it
diff --git a/docs/dev-progress.html b/docs/dev-progress.html
index e16f4e8b..d8cdb6af 100644
--- a/docs/dev-progress.html
+++ b/docs/dev-progress.html
@@ -283,7 +283,7 @@ Mozilla on inside and needs -moz-outline, no IE support.
A | Turn into ID |
noshade | HR | Boolean, style 'border-style:solid;' |
nowrap | TD, TH | Boolean, style 'white-space:nowrap;' (not compat with IE5) |
-size | HR | Near-equiv 'height', needs px suffix if original was pixels |
+size | HR | Near-equiv 'height', needs px suffix if original was pixels |
src | IMG | Required, insert blank or default img if not set |
start | OL | Poorly supported 'counter-reset', allowed in loose, dropped in strict |
type | LI | Equivalent style 'list-style-type', different allowed values though. (needs testing) |
diff --git a/library/HTMLPurifier/HTMLModule/TransformToStrict.php b/library/HTMLPurifier/HTMLModule/TransformToStrict.php
index 7b65012e..782a3fda 100644
--- a/library/HTMLPurifier/HTMLModule/TransformToStrict.php
+++ b/library/HTMLPurifier/HTMLModule/TransformToStrict.php
@@ -99,6 +99,8 @@ class HTMLPurifier_HTMLModule_TransformToStrict extends HTMLPurifier_HTMLModule
$this->info['img']->attr_transform_pre['hspace'] = new HTMLPurifier_AttrTransform_ImgSpace('hspace');
$this->info['img']->attr_transform_pre['vspace'] = new HTMLPurifier_AttrTransform_ImgSpace('vspace');
+ $this->info['hr']->attr_transform_pre['size'] = new HTMLPurifier_AttrTransform_Length('size', 'height');
+
}
var $defines_child_def = true;
diff --git a/tests/HTMLPurifier/Strategy/ValidateAttributesTest.php b/tests/HTMLPurifier/Strategy/ValidateAttributesTest.php
index 1a5e1b31..9514b2e1 100644
--- a/tests/HTMLPurifier/Strategy/ValidateAttributesTest.php
+++ b/tests/HTMLPurifier/Strategy/ValidateAttributesTest.php
@@ -214,6 +214,13 @@ class HTMLPurifier_Strategy_ValidateAttributesTest extends
'',
array('Attr.AllowedFrameTargets' => '_top', 'HTML.Strict' => true)
);
+
+ // hr rule transformations
+ $this->assertResult(
+ '
',
+ '
'
+ );
+
}
}