1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-05 05:37:49 +02:00

[1.7.0] Implement u, s, and strike tag transforms

- Extend Simple so that it can accept some light CSS
- Remove Center transform in favor of Simple

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1081 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2007-05-20 21:22:54 +00:00
parent 71326abec1
commit 2945f6a930
7 changed files with 33 additions and 42 deletions

View File

@@ -3,7 +3,6 @@
require_once 'HTMLPurifier/TagTransform.php';
// needs to be seperated into files
require_once 'HTMLPurifier/TagTransform/Center.php';
require_once 'HTMLPurifier/TagTransform/Font.php';
require_once 'HTMLPurifier/TagTransform/Simple.php';
@@ -104,9 +103,9 @@ class HTMLPurifier_TagTransformTest extends UnitTestCase
}
function testCenter() {
function testSimpleWithCSS() {
$transformer = new HTMLPurifier_TagTransform_Center();
$transformer = new HTMLPurifier_TagTransform_Simple('div', 'text-align:center;');
$this->assertTransformation(
$transformer,

View File

@@ -29,7 +29,7 @@ class HTMLPurifier_Test extends UnitTestCase
$this->assertPurification(
'<u>Illegal underline</u>',
'Illegal underline'
'<span style="text-decoration:underline;">Illegal underline</span>'
);
$this->assertPurification(