PHPIDS | ||||
![]() | ||||
|
||||
![]() |
Coverage | ||||||||||||
Classes | Methods | Lines | ||||||||||
Total |
|
100.00% | 1 / 1 |
|
0.00% | 0 / 1 |
|
20.00% | 1 / 5 | |||
HTMLPurifier_AttrTransform_Border |
|
100.00% | 1 / 1 |
|
0.00% | 0 / 1 |
|
20.00% | 1 / 5 | |||
public function transform($attr, $config, $context) |
|
0.00% | 0 / 1 |
|
0.00% | 0 / 4 |
1 : <?php 2 : 3 : /** 4 : * Pre-transform that changes deprecated border attribute to CSS. 5 : */ 6 1 : class HTMLPurifier_AttrTransform_Border extends HTMLPurifier_AttrTransform { 7 : 8 : public function transform($attr, $config, $context) { 9 0 : if (!isset($attr['border'])) return $attr; 10 0 : $border_width = $this->confiscateAttr($attr, 'border'); 11 : // some validation should happen here 12 0 : $this->prependCSS($attr, "border:{$border_width}px solid;"); 13 0 : return $attr; 14 : } 15 : 16 : } 17 : |
![]() |
Generated by PHPUnit 3.2.20 and Xdebug 2.0.3 at Sat Jun 7 16:15:42 CEST 2008. |