css-sanitizer
Classes to parse and sanitize CSS
|
Sanitizes a CSS @import rule. More...
Public Member Functions | |
__construct (MatcherFactory $matcherFactory, array $options=[]) | |
getIndex () | |
@inheritDoc | |
handlesRule (Rule $rule) | |
@inheritDoc | |
Public Member Functions inherited from Wikimedia\CSS\Sanitizer\Sanitizer | |
getSanitizationErrors () | |
Return all sanitization errors seen so far. | |
stashSanitizationErrors () | |
Temporarily clear sanitization errors. | |
clearSanitizationErrors () | |
Clear sanitization errors. | |
sanitize (CSSObject $object) | |
Sanitize a CSS object. | |
Protected Member Functions | |
doSanitize (CSSObject $object) | |
@inheritDoc | |
Protected Member Functions inherited from Wikimedia\CSS\Sanitizer\RuleSanitizer | |
sanitizeDeclarationBlock (SimpleBlock $block, PropertySanitizer $sanitizer) | |
Sanitize a block's contents as a DeclarationList, in place. | |
sanitizeRuleBlock (SimpleBlock $block, array $sanitizers) | |
Sanitize a block's contents as a RuleList, in place. | |
fixPreludeWhitespace (AtRule $rule, $cloneIfNecessary) | |
For the whitespace at the start of the prelude. | |
Protected Member Functions inherited from Wikimedia\CSS\Sanitizer\Sanitizer | |
sanitizationError ( $tag, CSSObject $object, array $data=[]) | |
Record a sanitization error. | |
sanitizeObj (Sanitizer $sanitizer, CSSObject $object) | |
Run another sanitizer over a CSSObject. | |
sanitizeList (Sanitizer $sanitizer, CSSObjectList $list) | |
Run a sanitizer over all CSSObjects in a CSSObjectList. | |
sanitizeRules (array $ruleSanitizers, RuleList $list) | |
Run a set of RuleSanitizers over all rules in a RuleList. | |
Protected Attributes | |
$matcher | |
Protected Attributes inherited from Wikimedia\CSS\Sanitizer\Sanitizer | |
$sanitizationErrors = [] | |
Sanitizes a CSS @import rule.
Wikimedia\CSS\Sanitizer\ImportAtRuleSanitizer::__construct | ( | MatcherFactory | $matcherFactory, |
array | $options = [] ) |
MatcherFactory | $matcherFactory | |
array | $options | Additional options:
|
|
protected |
@inheritDoc
Reimplemented from Wikimedia\CSS\Sanitizer\Sanitizer.
Wikimedia\CSS\Sanitizer\ImportAtRuleSanitizer::getIndex | ( | ) |
@inheritDoc
Reimplemented from Wikimedia\CSS\Sanitizer\RuleSanitizer.
Wikimedia\CSS\Sanitizer\ImportAtRuleSanitizer::handlesRule | ( | Rule | $rule | ) |
@inheritDoc
Reimplemented from Wikimedia\CSS\Sanitizer\RuleSanitizer.