Changeset 47891 for trunk/src/wp-includes/kses.php
- Timestamp:
- 06/02/2020 11:44:40 PM (5 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/kses.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/kses.php
r47837 r47891 2302 2302 } 2303 2303 2304 // Remove any CSS containing containing \ ( & } = or comments, except for url() useage checked above. 2305 if ( $found && ! preg_match( '%[\\\(&=}]|/\*%', $css_test_string ) ) { 2306 if ( '' !== $css ) { 2307 $css .= ';'; 2304 if ( $found ) { 2305 /** 2306 * Filters the regex limiting the list of characters not allowed in CSS rules. 2307 * 2308 * Default behaviour is to remove any css containing \ ( & } = or comments, except for url() usage. 2309 * 2310 * @since 5.5.0 2311 * 2312 * @param string $regex Regex pattern of disallowed characters in CSS rules. Default is '%[\\\(&=}]|/\*%'. 2313 * @param string $css_test_string CSS value to test. 2314 */ 2315 $disallowed_chars = apply_filters( 'safe_style_disallowed_chars', '%[\\\(&=}]|/\*%', $css_test_string ); 2316 if ( ! preg_match( $disallowed_chars, $css_test_string ) ) { 2317 if ( '' !== $css ) { 2318 $css .= ';'; 2319 } 2320 $css .= $css_item; 2308 2321 } 2309 2310 $css .= $css_item;2311 2322 } 2312 2323 }
Note: See TracChangeset
for help on using the changeset viewer.