|
MediaWiki master
|
Ensure SVG files cannot load external resources via URLs in CSS. More...
Public Member Functions | |
| checkPresentationalAttribute ( $value) | |
| Entry point to check presentational attributes like fill. | |
| checkStyleAttribute (string $value) | |
| Entry point to check style="..." attributes. | |
| checkStyleTag ( $value) | |
| Entry point to check <style> tags. | |
Ensure SVG files cannot load external resources via URLs in CSS.
Beyond that restriction, it aims to be relaxed in the CSS it allows.
data: URLs are also banned except in @font-face. The rationale behind this is unclear. The restriction was copied over from the predecessor to this class.
Definition at line 20 of file SvgCssChecker.php.
| MediaWiki\Upload\SvgCssChecker::checkPresentationalAttribute | ( | $value | ) |
Entry point to check presentational attributes like fill.
Presentational attributes can contain CSS like values such as url()
| string | $value |
Definition at line 84 of file SvgCssChecker.php.
| MediaWiki\Upload\SvgCssChecker::checkStyleAttribute | ( | string | $value | ) |
Entry point to check style="..." attributes.
| string | $value |
Definition at line 48 of file SvgCssChecker.php.
| MediaWiki\Upload\SvgCssChecker::checkStyleTag | ( | $value | ) |
Entry point to check <style> tags.
Note that data URLs are allowed in @font-face
| string | $value |
Definition at line 110 of file SvgCssChecker.php.