HTMLPurifier 4.4.0
/home/ezyang/Dev/htmlpurifier/library/HTMLPurifier/AttrTransform/Border.php
Go to the documentation of this file.
00001 <?php
00002 
00006 class HTMLPurifier_AttrTransform_Border extends HTMLPurifier_AttrTransform {
00007 
00008     public function transform($attr, $config, $context) {
00009         if (!isset($attr['border'])) return $attr;
00010         $border_width = $this->confiscateAttr($attr, 'border');
00011         // some validation should happen here
00012         $this->prependCSS($attr, "border:{$border_width}px solid;");
00013         return $attr;
00014     }
00015 
00016 }
00017 
00018 // vim: et sw=4 sts=4