0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-12-23 00:41:52 +00:00

More CSS selector options

Source https://www.w3schools.com/cssref/css_selectors.asp

Missing 

:lang(language)
:not(selector)
:nth-child(n)
:nth-last-child(n)
:nth-last-of-type(n)
:nth-of-type(n)
This commit is contained in:
Daijobou 2018-04-29 19:07:14 +02:00 committed by GitHub
parent 89b3fe431e
commit d91e3ea8c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,12 +62,38 @@ class HTMLPurifier_Filter_ExtractStyleBlocks extends HTMLPurifier_Filter
$this->_class_attrdef = new HTMLPurifier_AttrDef_CSS_Ident(); $this->_class_attrdef = new HTMLPurifier_AttrDef_CSS_Ident();
$this->_enum_attrdef = new HTMLPurifier_AttrDef_Enum( $this->_enum_attrdef = new HTMLPurifier_AttrDef_Enum(
array( array(
'first-child',
'link',
'visited',
'active', 'active',
'after',
'before',
'checked',
'disabled',
'empty',
'enabled',
'first-child',
'first-letter',
'first-line',
'first-of-type',
'focus',
'hover', 'hover',
'focus' 'in-range',
'invalid',
'last-child',
'last-of-type',
'link',
'nth-child(odd)',
'nth-child(even)',
'only-of-type',
'only-child',
'optional',
'out-of-range',
'read-only',
'read-write',
'required',
'root',
'selection',
'target',
'valid',
'visited',
) )
); );
} }