Changeset 52483
- Timestamp:
- 01/06/2022 06:25:11 PM (3 years ago)
- Location:
- branches/4.0
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.0
- Property svn:mergeinfo changed
/trunk merged: 52454,52456-52457
- Property svn:mergeinfo changed
-
branches/4.0/src/wp-admin/includes/upgrade.php
r32432 r52483 1076 1076 while( $rows = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options ORDER BY option_id LIMIT $start, 20" ) ) { 1077 1077 foreach( $rows as $row ) { 1078 $value = $row->option_value;1079 if ( !@unserialize( $value ))1078 $value = maybe_unserialize( $row->option_value ); 1079 if ( $value === $row->option_value ) 1080 1080 $value = stripslashes( $value ); 1081 1081 if ( $value !== $row->option_value ) { -
branches/4.0/src/wp-includes/formatting.php
r47659 r52483 859 859 * 860 860 * @since 1.5.0 861 * @since 5.8.3 Added the `encode_ascii_characters` parameter. 861 862 * 862 863 * @param string $utf8_string 863 864 * @param int $length Max length of the string 865 * @param bool $encode_ascii_characters Whether to encode ascii characters such as < " ' 864 866 * @return string String with Unicode encoded for URI. 865 867 */ 866 function utf8_uri_encode( $utf8_string, $length = 0 ) {868 function utf8_uri_encode( $utf8_string, $length = 0, $encode_ascii_characters = false ) { 867 869 $unicode = ''; 868 870 $values = array(); … … 879 881 880 882 if ( $value < 128 ) { 881 if ( $length && ( $unicode_length >= $length ) ) 883 $char = chr( $value ); 884 $encoded_char = $encode_ascii_characters ? rawurlencode( $char ) : $char; 885 $encoded_char_length = strlen( $encoded_char ); 886 if ( $length && ( $unicode_length + $encoded_char_length ) > $length ) { 882 887 break; 883 $unicode .= chr($value); 884 $unicode_length++; 888 } 889 $unicode .= $encoded_char; 890 $unicode_length += $encoded_char_length; 885 891 } else { 886 892 if ( count( $values ) == 0 ) $num_octets = ( $value < 224 ) ? 2 : 3; -
branches/4.0/src/wp-includes/post.php
r43402 r52483 3790 3790 $slug = substr( $slug, 0, $length ); 3791 3791 else 3792 $slug = utf8_uri_encode( $decoded_slug, $length );3792 $slug = utf8_uri_encode( $decoded_slug, $length, true ); 3793 3793 } 3794 3794 -
branches/4.0/src/wp-includes/taxonomy.php
r37139 r52483 834 834 } 835 835 836 $query['terms'] = array_unique( (array) $query['terms'] ); 836 if ( 'slug' === $query['field'] || 'name' === $query['field'] ) { 837 $query['terms'] = array_unique( (array) $query['terms'] ); 838 } else { 839 $query['terms'] = wp_parse_id_list( $query['terms'] ); 840 } 837 841 838 842 if ( is_taxonomy_hierarchical( $query['taxonomy'] ) && $query['include_children'] ) {
Note: See TracChangeset
for help on using the changeset viewer.