css-sanitizer
Classes to parse and sanitize CSS
|
Sanitizes a Declaration representing a CSS style property. More...
Public Member Functions | |
__construct (MatcherFactory $matcherFactory) | |
Public Member Functions inherited from Wikimedia\CSS\Sanitizer\PropertySanitizer | |
__construct (array $properties=[], ?Matcher $cssWideKeywordsMatcher=null) | |
getKnownProperties () | |
Access the list of known properties. | |
setKnownProperties (array $properties) | |
Set the list of known properties. | |
addKnownProperties ( $props) | |
Merge a list of matchers into the list of known properties. | |
getCssWideKeywordsMatcher () | |
Fetch the matcher for keywords that should be recognized for all properties. | |
setCssWideKeywordsMatcher (Matcher $matcher) | |
Set the matcher for keywords that should be recognized for all properties. | |
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 | |
css2 (MatcherFactory $matcherFactory) | |
Properties from CSS 2.1. | |
cssDisplay3 (MatcherFactory $matcherFactory) | |
Properties for CSS Display Module Level 3. | |
cssPosition3 (MatcherFactory $matcherFactory) | |
Properties for CSS Positioned Layout Module Level 3. | |
cssColor3 (MatcherFactory $matcherFactory) | |
Properties for CSS Color Module Level 3. | |
backgroundTypes (MatcherFactory $matcherFactory) | |
Data types for backgrounds. | |
cssBorderBackground3 (MatcherFactory $matcherFactory) | |
Properties for CSS Backgrounds and Borders Module Level 3. | |
cssImages3 (MatcherFactory $matcherFactory) | |
Properties for CSS Images Module Level 3. | |
cssFonts3 (MatcherFactory $matcherFactory) | |
Properties for CSS Fonts Module Level 3. | |
cssMulticol (MatcherFactory $matcherFactory) | |
Properties for CSS Multi-column Layout Module. | |
cssOverflow3 (MatcherFactory $matcherFactory) | |
Properties for CSS Overflow Module Level 3. | |
cssUI4 (MatcherFactory $matcherFactory) | |
Properties for CSS Basic User Interface Module Level 4. | |
cssCompositing1 (MatcherFactory $matcherFactory) | |
Properties for CSS Compositing and Blending Level 1. | |
cssWritingModes4 (MatcherFactory $matcherFactory) | |
Properties for CSS Writing Modes Level 4. | |
cssTransitions (MatcherFactory $matcherFactory) | |
Properties for CSS Transitions. | |
cssAnimations (MatcherFactory $matcherFactory) | |
Properties for CSS Animations. | |
cssFlexbox3 (MatcherFactory $matcherFactory) | |
Properties for CSS Flexible Box Layout Module Level 1. | |
cssTransforms1 (MatcherFactory $matcherFactory) | |
Properties for CSS Transforms Module Level 1. | |
cssText3 (MatcherFactory $matcherFactory) | |
Properties for CSS Text Module Level 3. | |
cssTextDecor3 (MatcherFactory $matcherFactory) | |
Properties for CSS Text Decoration Module Level 3. | |
cssAlign3 (MatcherFactory $matcherFactory) | |
Properties for CSS Box Alignment Module Level 3. | |
cssBreak3 (MatcherFactory $matcherFactory) | |
Properties for CSS Fragmentation Module Level 3. | |
cssGrid1 (MatcherFactory $matcherFactory) | |
Properties for CSS Grid Layout Module Level 1. | |
cssFilter1 (MatcherFactory $matcherFactory) | |
Properties for CSS Filter Effects Module Level 1. | |
basicShapes (MatcherFactory $matcherFactory) | |
Shapes and masking share these basic shapes. | |
cssShapes1 (MatcherFactory $matcherFactory) | |
Properties for CSS Shapes Module Level 1. | |
cssMasking1 (MatcherFactory $matcherFactory) | |
Properties for CSS Masking Module Level 1. | |
getSizingAdditions (MatcherFactory $matcherFactory) | |
Additional keywords and functions from CSS Intrinsic and Extrinsic Sizing Level 3. | |
cssSizing3 (MatcherFactory $matcherFactory) | |
Properties for CSS Intrinsic and Extrinsic Sizing Level 3. | |
cssLogical1 (MatcherFactory $matcherFactory) | |
Properties for CSS Logical 1. | |
Protected Member Functions inherited from Wikimedia\CSS\Sanitizer\PropertySanitizer | |
doSanitize (CSSObject $object) | |
@inheritDoc | |
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 | |
$cache = [] | |
Protected Attributes inherited from Wikimedia\CSS\Sanitizer\Sanitizer | |
$sanitizationErrors = [] | |
Sanitizes a Declaration representing a CSS style property.
Wikimedia\CSS\Sanitizer\StylePropertySanitizer::__construct | ( | MatcherFactory | $matcherFactory | ) |
MatcherFactory | $matcherFactory | Factory for Matchers |
|
protected |
Data types for backgrounds.
MatcherFactory | $matcherFactory | Factory for Matchers |
|
protected |
Shapes and masking share these basic shapes.
MatcherFactory | $matcherFactory | Factory for Matchers |
|
protected |
Properties from CSS 2.1.
MatcherFactory | $matcherFactory | Factory for Matchers |
|
protected |
Properties for CSS Box Alignment Module Level 3.
MatcherFactory | $matcherFactory | Factory for Matchers |
|
protected |
Properties for CSS Animations.
MatcherFactory | $matcherFactory | Factory for Matchers |
|
protected |
Properties for CSS Backgrounds and Borders Module Level 3.
MatcherFactory | $matcherFactory | Factory for Matchers |
|
protected |
Properties for CSS Fragmentation Module Level 3.
MatcherFactory | $matcherFactory | Factory for Matchers |
|
protected |
Properties for CSS Color Module Level 3.
MatcherFactory | $matcherFactory | Factory for Matchers |
|
protected |
Properties for CSS Compositing and Blending Level 1.
MatcherFactory | $matcherFactory | Factory for Matchers |
|
protected |
Properties for CSS Display Module Level 3.
MatcherFactory | $matcherFactory | Factory for Matchers |
|
protected |
Properties for CSS Filter Effects Module Level 1.
MatcherFactory | $matcherFactory | Factory for Matchers |
|
protected |
Properties for CSS Flexible Box Layout Module Level 1.
MatcherFactory | $matcherFactory | Factory for Matchers |
|
protected |
Properties for CSS Fonts Module Level 3.
MatcherFactory | $matcherFactory | Factory for Matchers |
|
protected |
Properties for CSS Grid Layout Module Level 1.
MatcherFactory | $matcherFactory | Factory for Matchers |
|
protected |
Properties for CSS Images Module Level 3.
MatcherFactory | $matcherFactory | Factory for Matchers |
|
protected |
Properties for CSS Logical 1.
MatcherFactory | $matcherFactory | Factory for Matchers |
|
protected |
Properties for CSS Masking Module Level 1.
MatcherFactory | $matcherFactory | Factory for Matchers |
|
protected |
Properties for CSS Multi-column Layout Module.
MatcherFactory | $matcherFactory | Factory for Matchers |
|
protected |
Properties for CSS Overflow Module Level 3.
MatcherFactory | $matcherFactory | Factory for Matchers |
|
protected |
Properties for CSS Positioned Layout Module Level 3.
MatcherFactory | $matcherFactory | Factory for Matchers |
|
protected |
Properties for CSS Shapes Module Level 1.
MatcherFactory | $matcherFactory | Factory for Matchers |
|
protected |
Properties for CSS Intrinsic and Extrinsic Sizing Level 3.
MatcherFactory | $matcherFactory | Factory for Matchers |
|
protected |
Properties for CSS Text Module Level 3.
MatcherFactory | $matcherFactory | Factory for Matchers |
|
protected |
Properties for CSS Text Decoration Module Level 3.
MatcherFactory | $matcherFactory | Factory for Matchers |
|
protected |
Properties for CSS Transforms Module Level 1.
MatcherFactory | $matcherFactory | Factory for Matchers |
|
protected |
Properties for CSS Transitions.
MatcherFactory | $matcherFactory | Factory for Matchers |
|
protected |
Properties for CSS Basic User Interface Module Level 4.
MatcherFactory | $matcherFactory | Factory for Matchers |
|
protected |
Properties for CSS Writing Modes Level 4.
MatcherFactory | $matcherFactory | Factory for Matchers |
|
protected |
Additional keywords and functions from CSS Intrinsic and Extrinsic Sizing Level 3.
MatcherFactory | $matcherFactory | Factory for Matchers |