Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 29 additions & 3 deletions library/HTMLPurifier/Filter/ExtractStyleBlocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,38 @@ public function __construct()
$this->_class_attrdef = new HTMLPurifier_AttrDef_CSS_Ident();
$this->_enum_attrdef = new HTMLPurifier_AttrDef_Enum(
array(
'active',
'after',
'before',
'checked',
'disabled',
'empty',
'enabled',
'first-child',
'first-letter',
'first-line',
'first-of-type',
'focus',
'hover',
'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',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is not OK by default, it lets you "escape" from the specified region where styling is occurred, assuming that an anchor was specified.

'selection',
'target',
'valid',
'visited',
'active',
'hover',
'focus'
)
);
}
Expand Down