mirror of
https://github.com/WordPress/WordPress.git
synced 2026-06-19 07:37:07 +00:00
KSES: Allow SVG presentation attributes in safe_style_css.
Add SVG presentation attributes to the list of CSS properties allowed by `safecss_filter_attr()`, so inline SVG markup can be styled via the `style` attribute. This ports Gutenberg PR #79172 to Core. Props afercia, westonruter, wildworks. Fixes #65457. Built from https://develop.svn.wordpress.org/trunk@62530 git-svn-id: http://core.svn.wordpress.org/trunk@61811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -2579,6 +2579,7 @@ function safecss_filter_attr( $css, $deprecated = '' ) {
|
||||
* Filters the list of allowed CSS attributes.
|
||||
*
|
||||
* @since 2.8.1
|
||||
* @since 7.1.0 Added support for SVG presentation attributes.
|
||||
*
|
||||
* @param string[] $attr Array of allowed CSS attributes.
|
||||
*/
|
||||
@@ -2737,6 +2738,71 @@ function safecss_filter_attr( $css, $deprecated = '' ) {
|
||||
'aspect-ratio',
|
||||
'container-type',
|
||||
|
||||
'fill',
|
||||
'fill-opacity',
|
||||
'fill-rule',
|
||||
|
||||
'stroke',
|
||||
'stroke-dasharray',
|
||||
'stroke-dashoffset',
|
||||
'stroke-linecap',
|
||||
'stroke-linejoin',
|
||||
'stroke-miterlimit',
|
||||
'stroke-opacity',
|
||||
'stroke-width',
|
||||
|
||||
'color-interpolation',
|
||||
'color-interpolation-filters',
|
||||
'paint-order',
|
||||
'stop-color',
|
||||
'stop-opacity',
|
||||
'flood-color',
|
||||
'flood-opacity',
|
||||
'lighting-color',
|
||||
|
||||
'marker',
|
||||
'marker-end',
|
||||
'marker-mid',
|
||||
'marker-start',
|
||||
|
||||
'clip-path',
|
||||
'clip-rule',
|
||||
'mask',
|
||||
'mask-type',
|
||||
|
||||
'cx',
|
||||
'cy',
|
||||
'r',
|
||||
'rx',
|
||||
'ry',
|
||||
'x',
|
||||
'y',
|
||||
'd',
|
||||
|
||||
'alignment-baseline',
|
||||
'baseline-shift',
|
||||
'dominant-baseline',
|
||||
'glyph-orientation-horizontal',
|
||||
'glyph-orientation-vertical',
|
||||
'text-anchor',
|
||||
'unicode-bidi',
|
||||
'word-spacing',
|
||||
|
||||
'font-size-adjust',
|
||||
'font-stretch',
|
||||
|
||||
'color-rendering',
|
||||
'image-rendering',
|
||||
'shape-rendering',
|
||||
'text-rendering',
|
||||
'vector-effect',
|
||||
|
||||
'transform',
|
||||
'transform-origin',
|
||||
|
||||
'pointer-events',
|
||||
'visibility',
|
||||
|
||||
// Custom CSS properties.
|
||||
'--*',
|
||||
)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '7.1-alpha-62529';
|
||||
$wp_version = '7.1-alpha-62530';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
||||
Reference in New Issue
Block a user