Ticket #47367: 47367.2.diff
File 47367.2.diff, 3.8 KB (added by , 5 years ago) |
---|
-
src/wp-includes/kses.php
diff --git a/src/wp-includes/kses.php b/src/wp-includes/kses.php index 7975949370..07edc91ea9 100644
a b function safecss_filter_attr( $css, $deprecated = '' ) { 2071 2071 * @since 5.0.0 Added support for `background-image`. 2072 2072 * @since 5.1.0 Added support for `text-transform`. 2073 2073 * @since 5.2.0 Added support for `background-position` and `grid-template-columns` 2074 * @since 5.3.0 Added support for `flex`, `flex-grow`, `flex-shrink`, and `flex-basis`. 2074 * @since 5.3.0 Added support for `grid`, `flex` and `column` layout properties. 2075 * Extend `background-*` support of individual properties. 2075 2076 * 2076 2077 * @param string[] $attr Array of allowed CSS attributes. 2077 2078 */ … … function safecss_filter_attr( $css, $deprecated = '' ) { 2082 2083 'background-color', 2083 2084 'background-image', 2084 2085 'background-position', 2086 'background-size', 2087 'background-attachment', 2088 'background-blend-mode', 2085 2089 2086 2090 'border', 2091 'border-radius', 2087 2092 'border-width', 2088 2093 'border-color', 2089 2094 'border-style', … … function safecss_filter_attr( $css, $deprecated = '' ) { 2108 2113 'border-collapse', 2109 2114 'caption-side', 2110 2115 2116 'columns', 2117 'column-count', 2118 'column-fill', 2119 'column-gap', 2120 'column-rule', 2121 'column-span', 2122 'column-width', 2123 2111 2124 'color', 2112 2125 'font', 2113 2126 'font-family', … … function safecss_filter_attr( $css, $deprecated = '' ) { 2143 2156 'padding-top', 2144 2157 2145 2158 'flex', 2159 'flex-basis', 2160 'flex-direction', 2161 'flex-flow', 2146 2162 'flex-grow', 2147 2163 'flex-shrink', 2148 'flex-basis', 2164 2165 'grid-template-columns', 2166 'grid-auto-columns', 2167 'grid-column-start', 2168 'grid-column-end', 2169 'grid-column-gap', 2170 'grid-template-rows', 2171 'grid-auto-rows', 2172 'grid-row-start', 2173 'grid-row-end', 2174 'grid-row-gap', 2175 'grid-gap', 2176 2177 'justify-content', 2178 'justify-items', 2179 'justify-self', 2180 'align-content', 2181 'align-items', 2182 'align-self', 2149 2183 2150 2184 'clear', 2151 2185 'cursor', … … function safecss_filter_attr( $css, $deprecated = '' ) { 2154 2188 'overflow', 2155 2189 'vertical-align', 2156 2190 'list-style-type', 2157 'grid-template-columns',2158 2191 ) 2159 2192 ); 2160 2193 -
tests/phpunit/tests/kses.php
diff --git a/tests/phpunit/tests/kses.php b/tests/phpunit/tests/kses.php index 039d5400b2..a42d1ff0bb 100644
a b EOF; 841 841 ), 842 842 // `flex` and related attributes introduced in 5.3. 843 843 array( 844 'css' => 'flex: 0 1 auto;flex-basis: 75%;flex-shrink: 0;flex-grow: 1', 845 'expected' => 'flex: 0 1 auto;flex-basis: 75%;flex-shrink: 0;flex-grow: 1', 844 'css' => 'flex: 0 1 auto;flex-basis: 75%;flex-shrink: 0;flex-grow: 1;align-items: stretch', 845 'expected' => 'flex: 0 1 auto;flex-basis: 75%;flex-shrink: 0;flex-grow: 1;align-items: stretch', 846 ), 847 // `grid` and related attributes introduced in 5.3. 848 array( 849 'css' => 'grid-row-start: -3;grid-column-end: span 3', 850 'expected' => 'grid-row-start: -3;grid-column-end: span 3', 851 ), 852 array( 853 'css' => 'grid-template-columns: 60px 60px;grid-auto-rows: 100px', 854 'expected' => 'grid-template-columns: 60px 60px;grid-auto-rows: 100px', 855 ), 856 // `flex` and `grid` alignments introduced in 5.3. 857 array( 858 'css' => 'align-content: space-between;align-items: start;justify-items: center;justify-content: space-between;justify-self: end', 859 'expected' => 'align-content: space-between;align-items: start;justify-items: center;justify-content: space-between;justify-self: end', 860 ), 861 // `columns` and related attributes introduced in 5.3 862 array( 863 'css' => 'columns: 3 auto;column-rule: solid 6px;column-width: 120px;column-gap: 2rem;column-span: none;column-count: 3', 864 'expected' => 'columns: 3 auto;column-rule: solid 6px;column-width: 120px;column-gap: 2rem;column-span: none;column-count: 3', 846 865 ), 847 866 ); 848 867 }