Changeset 52481
- Timestamp:
- 01/06/2022 06:19:36 PM (3 years ago)
- Location:
- branches/4.2
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.2
- Property svn:mergeinfo changed
/trunk merged: 52454-52457
- Property svn:mergeinfo changed
-
branches/4.2/src/wp-admin/includes/upgrade.php
r37939 r52481 1164 1164 while( $rows = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options ORDER BY option_id LIMIT $start, 20" ) ) { 1165 1165 foreach( $rows as $row ) { 1166 $value = $row->option_value;1167 if ( !@unserialize( $value ))1166 $value = maybe_unserialize( $row->option_value ); 1167 if ( $value === $row->option_value ) 1168 1168 $value = stripslashes( $value ); 1169 1169 if ( $value !== $row->option_value ) { -
branches/4.2/src/wp-includes/formatting.php
r47657 r52481 909 909 * 910 910 * @since 1.5.0 911 * @since 5.8.3 Added the `encode_ascii_characters` parameter. 911 912 * 912 913 * @param string $utf8_string 913 914 * @param int $length Max length of the string 915 * @param bool $encode_ascii_characters Whether to encode ascii characters such as < " ' 914 916 * @return string String with Unicode encoded for URI. 915 917 */ 916 function utf8_uri_encode( $utf8_string, $length = 0 ) {918 function utf8_uri_encode( $utf8_string, $length = 0, $encode_ascii_characters = false ) { 917 919 $unicode = ''; 918 920 $values = array(); … … 929 931 930 932 if ( $value < 128 ) { 931 if ( $length && ( $unicode_length >= $length ) ) 933 $char = chr( $value ); 934 $encoded_char = $encode_ascii_characters ? rawurlencode( $char ) : $char; 935 $encoded_char_length = strlen( $encoded_char ); 936 if ( $length && ( $unicode_length + $encoded_char_length ) > $length ) { 932 937 break; 933 $unicode .= chr($value); 934 $unicode_length++; 938 } 939 $unicode .= $encoded_char; 940 $unicode_length += $encoded_char_length; 935 941 } else { 936 942 if ( count( $values ) == 0 ) { -
branches/4.2/src/wp-includes/meta.php
r49404 r52481 1549 1549 $sibling_compare = strtoupper( $sibling['compare'] ); 1550 1550 if ( in_array( $clause_compare, $compatible_compares ) && in_array( $sibling_compare, $compatible_compares ) ) { 1551 $alias = $sibling['alias'];1551 $alias = preg_replace( '/\W/', '_', $sibling['alias'] ); 1552 1552 break; 1553 1553 } -
branches/4.2/src/wp-includes/post.php
r43400 r52481 3826 3826 $slug = substr( $slug, 0, $length ); 3827 3827 else 3828 $slug = utf8_uri_encode( $decoded_slug, $length );3828 $slug = utf8_uri_encode( $decoded_slug, $length, true ); 3829 3829 } 3830 3830 -
branches/4.2/src/wp-includes/taxonomy.php
r37137 r52481 1156 1156 // The sibling must both have compatible operator to share its alias. 1157 1157 if ( in_array( strtoupper( $sibling['operator'] ), $compatible_operators ) ) { 1158 $alias = $sibling['alias'];1158 $alias = preg_replace( '/\W/', '_', $sibling['alias'] ); 1159 1159 break; 1160 1160 } … … 1186 1186 } 1187 1187 1188 $query['terms'] = array_unique( (array) $query['terms'] ); 1188 if ( 'slug' === $query['field'] || 'name' === $query['field'] ) { 1189 $query['terms'] = array_unique( (array) $query['terms'] ); 1190 } else { 1191 $query['terms'] = wp_parse_id_list( $query['terms'] ); 1192 } 1189 1193 1190 1194 if ( is_taxonomy_hierarchical( $query['taxonomy'] ) && $query['include_children'] ) {
Note: See TracChangeset
for help on using the changeset viewer.