Changeset 47808 for trunk/src/wp-includes/kses.php
- Timestamp:
- 05/16/2020 06:40:52 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/kses.php
r47550 r47808 776 776 // Remove quotes surrounding $value. 777 777 // Also guarantee correct quoting in $string for this one attribute. 778 if ( '' == $value ) {778 if ( '' === $value ) { 779 779 $quote = ''; 780 780 } else { 781 781 $quote = $value[0]; 782 782 } 783 if ( '"' == $quote || "'"== $quote ) {783 if ( '"' === $quote || "'" === $quote ) { 784 784 if ( substr( $value, -1 ) != $quote ) { 785 785 return ''; … … 1040 1040 1041 1041 // It matched a ">" character. 1042 if ( substr( $string, 0, 1 ) != '<') {1042 if ( '<' !== substr( $string, 0, 1 ) ) { 1043 1043 return '>'; 1044 1044 } 1045 1045 1046 1046 // Allow HTML comments. 1047 if ( '<!--' == substr( $string, 0, 4 ) ) {1047 if ( '<!--' === substr( $string, 0, 4 ) ) { 1048 1048 $string = str_replace( array( '<!--', '-->' ), '', $string ); 1049 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 } … … 1165 1165 $allowed_attr = $allowed_html[ $element_low ]; 1166 1166 1167 if ( ! isset( $allowed_attr[ $name_low ] ) || '' == $allowed_attr[ $name_low ] ) {1167 if ( ! isset( $allowed_attr[ $name_low ] ) || '' === $allowed_attr[ $name_low ] ) { 1168 1168 /* 1169 1169 * Allow `data-*` attributes. … … 1190 1190 } 1191 1191 1192 if ( 'style' == $name_low ) {1192 if ( 'style' === $name_low ) { 1193 1193 $new_value = safecss_filter_attr( $value ); 1194 1194 … … 1610 1610 1611 1611 $string = preg_replace( '/[\x00-\x08\x0B\x0C\x0E-\x1F]/', '', $string ); 1612 if ( 'remove' == $options['slash_zero'] ) {1612 if ( 'remove' === $options['slash_zero'] ) { 1613 1613 $string = preg_replace( '/\\\\+0+/', '', $string ); 1614 1614 } … … 1689 1689 $string = trim( $string2[1] ); 1690 1690 $protocol = wp_kses_bad_protocol_once2( $string2[0], $allowed_protocols ); 1691 if ( 'feed:' == $protocol ) {1691 if ( 'feed:' === $protocol ) { 1692 1692 if ( $count > 2 ) { 1693 1693 return ''; … … 2245 2245 $css = ''; 2246 2246 foreach ( $css_array as $css_item ) { 2247 if ( '' == $css_item ) {2247 if ( '' === $css_item ) { 2248 2248 continue; 2249 2249 } … … 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.