2223 | | // Remove any CSS containing containing \ ( & } = or comments, except for url() useage checked above. |
2224 | | if ( $found && ! preg_match( '%[\\\(&=}]|/\*%', $css_test_string ) ) { |
2225 | | if ( $css != '' ) { |
2226 | | $css .= ';'; |
| 2223 | if ( $found ) { |
| 2224 | |
| 2225 | /** |
| 2226 | * Filters list of characters not allowed in CSS rules. |
| 2227 | * Default behaviour is removing any inline css containing \ ( & } = or comments, except for url() usage checked above. |
| 2228 | * |
| 2229 | * @param string Pattern of disallowed characters in CSS rules. |
| 2230 | * @param string CSS value to test. |
| 2231 | */ |
| 2232 | $disallowed_chars = apply_filters( 'safe_style_disallowed_chars', '%[\\\(&=}]|/\*%', $css_test_string ); |
| 2233 | if ( ! preg_match( $disallowed_chars, $css ) ) { |
| 2234 | if ( '' !== $css ) { |
| 2235 | $css .= ';'; |
| 2236 | } |
| 2237 | $css .= $css_item; |