1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-06 06:07:26 +02:00

[1.6.1] Refactor AttrTransform to reduce duplication.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1016 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2007-05-05 02:25:55 +00:00
parent bbea02f55c
commit 0426985c81
11 changed files with 84 additions and 47 deletions

View File

@@ -28,13 +28,10 @@ extends HTMLPurifier_AttrTransform {
}
function transform($attr, $config, &$context) {
if (!isset($attr[$this->attr])) return $attr;
unset($attr[$this->attr]);
if (!isset($attr['style'])) $attr['style'] = '';
$attr['style'] = $this->css . $attr['style'];
$this->prependCSS($attr, $this->css);
return $attr;
}
}