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:
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user