1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-01 11:50:28 +02:00

Add relative length units from CSS 3

cf. https://www.w3schools.com/cssref/css_units.asp
This commit is contained in:
Jan Dageförde
2017-10-15 19:02:38 +02:00
committed by Edward Z. Yang
parent df64746caa
commit 67c3798922
2 changed files with 8 additions and 2 deletions

View File

@@ -26,12 +26,14 @@ class HTMLPurifier_Length
protected $isValid;
/**
* Array Lookup array of units recognized by CSS 2.1
* Array Lookup array of units recognized by CSS 3
* @type array
*/
protected static $allowedUnits = array(
'em' => true, 'ex' => true, 'px' => true, 'in' => true,
'cm' => true, 'mm' => true, 'pt' => true, 'pc' => true
'cm' => true, 'mm' => true, 'pt' => true, 'pc' => true,
'ch' => true, 'rem' => true, 'vw' => true, 'vh' => true,
'vmin' => true, 'vmax' => true
);
/**