Changeset 47219 for trunk/src/wp-includes/kses.php
- Timestamp:
- 02/09/2020 04:52:28 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/kses.php
r47122 r47219 1047 1047 if ( '<!--' == substr( $string, 0, 4 ) ) { 1048 1048 $string = str_replace( array( '<!--', '-->' ), '', $string ); 1049 while ( $string != ( $newstring = wp_kses( $string, $allowed_html, $allowed_protocols ) )) {1049 while ( ( $newstring = wp_kses( $string, $allowed_html, $allowed_protocols ) ) != $string ) { 1050 1050 $string = $newstring; 1051 1051 } 1052 if ( $string == '') {1052 if ( '' == $string ) { 1053 1053 return ''; 1054 1054 } … … 1079 1079 1080 1080 // No attributes are allowed for closing elements. 1081 if ( $slash != '') {1081 if ( '' != $slash ) { 1082 1082 return "</$elem>"; 1083 1083 } … … 1349 1349 } // End switch. 1350 1350 1351 if ( $working == 0) { // Not well-formed, remove and try again.1351 if ( 0 == $working ) { // Not well-formed, remove and try again. 1352 1352 $attr = wp_kses_html_error( $attr ); 1353 1353 $mode = 0; … … 1355 1355 } // End while. 1356 1356 1357 if ( $mode == 1&& false === array_key_exists( $attrname, $attrarr ) ) {1357 if ( 1 == $mode && false === array_key_exists( $attrname, $attrarr ) ) { 1358 1358 // Special case, for when the attribute list ends with a valueless 1359 1359 // attribute like "selected". … … 1846 1846 */ 1847 1847 function valid_unicode( $i ) { 1848 return ( $i == 0x9 || $i == 0xa || $i == 0xd||1849 ( $i >= 0x20&& $i <= 0xd7ff ) ||1850 ( $i >= 0xe000&& $i <= 0xfffd ) ||1851 ( $i >= 0x10000&& $i <= 0x10ffff ) );1848 return ( 0x9 == $i || 0xa == $i || 0xd == $i || 1849 ( 0x20 <= $i && $i <= 0xd7ff ) || 1850 ( 0xe000 <= $i && $i <= 0xfffd ) || 1851 ( 0x10000 <= $i && $i <= 0x10ffff ) ); 1852 1852 } 1853 1853 … … 2245 2245 $css = ''; 2246 2246 foreach ( $css_array as $css_item ) { 2247 if ( $css_item == '') {2247 if ( '' == $css_item ) { 2248 2248 continue; 2249 2249 } … … 2283 2283 $url = trim( $url_pieces[2] ); 2284 2284 2285 if ( empty( $url ) || $url !== wp_kses_bad_protocol( $url, $allowed_protocols )) {2285 if ( empty( $url ) || wp_kses_bad_protocol( $url, $allowed_protocols ) !== $url ) { 2286 2286 $found = false; 2287 2287 break; … … 2303 2303 // Remove any CSS containing containing \ ( & } = or comments, except for url() useage checked above. 2304 2304 if ( $found && ! preg_match( '%[\\\(&=}]|/\*%', $css_test_string ) ) { 2305 if ( $css != '') {2305 if ( '' != $css ) { 2306 2306 $css .= ';'; 2307 2307 }
Note: See TracChangeset
for help on using the changeset viewer.