mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-01-03 13:21:51 +00:00
Fix more PHP 5.3 problems.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
This commit is contained in:
parent
d728205767
commit
5688656174
@ -59,19 +59,19 @@ class HTMLPurifier_AttrDef_CSS_Color extends HTMLPurifier_AttrDef
|
|||||||
* Allowed types for values :
|
* Allowed types for values :
|
||||||
* parameter_position => [type => max_value]
|
* parameter_position => [type => max_value]
|
||||||
*/
|
*/
|
||||||
$allowed_types = [
|
$allowed_types = array(
|
||||||
1 => ['percentage' => 100, 'integer' => 255],
|
1 => array('percentage' => 100, 'integer' => 255),
|
||||||
2 => ['percentage' => 100, 'integer' => 255],
|
2 => array('percentage' => 100, 'integer' => 255),
|
||||||
3 => ['percentage' => 100, 'integer' => 255],
|
3 => array('percentage' => 100, 'integer' => 255),
|
||||||
];
|
);
|
||||||
$allow_different_types = false;
|
$allow_different_types = false;
|
||||||
|
|
||||||
if (strpos($function, 'hsl') !== false) {
|
if (strpos($function, 'hsl') !== false) {
|
||||||
$allowed_types = [
|
$allowed_types = array(
|
||||||
1 => ['integer' => 360],
|
1 => array('integer' => 360),
|
||||||
2 => ['percentage' => 100],
|
2 => array('percentage' => 100),
|
||||||
3 => ['percentage' => 100],
|
3 => array('percentage' => 100),
|
||||||
];
|
);
|
||||||
$allow_different_types = true;
|
$allow_different_types = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user