Changeset 52486
- Timestamp:
- 01/06/2022 06:27:19 PM (3 years ago)
- Location:
- branches/3.7
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.7
- Property svn:mergeinfo changed
/trunk merged: 52454,52456-52457
- Property svn:mergeinfo changed
-
branches/3.7/src
- Property svn:mergeinfo changed
/trunk/src merged: 52454,52456-52457
- Property svn:mergeinfo changed
-
branches/3.7/src/wp-admin/includes/upgrade.php
r47343 r52486 1039 1039 while( $rows = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options ORDER BY option_id LIMIT $start, 20" ) ) { 1040 1040 foreach( $rows as $row ) { 1041 $value = $row->option_value;1042 if ( !@unserialize( $value ))1041 $value = maybe_unserialize( $row->option_value ); 1042 if ( $value === $row->option_value ) 1043 1043 $value = stripslashes( $value ); 1044 1044 if ( $value !== $row->option_value ) { -
branches/3.7/src/wp-includes/formatting.php
r47662 r52486 664 664 * 665 665 * @since 1.5.0 666 * @since 5.8.3 Added the `encode_ascii_characters` parameter. 666 667 * 667 668 * @param string $utf8_string 668 669 * @param int $length Max length of the string 670 * @param bool $encode_ascii_characters Whether to encode ascii characters such as < " ' 669 671 * @return string String with Unicode encoded for URI. 670 672 */ 671 function utf8_uri_encode( $utf8_string, $length = 0 ) {673 function utf8_uri_encode( $utf8_string, $length = 0, $encode_ascii_characters = false ) { 672 674 $unicode = ''; 673 675 $values = array(); … … 681 683 682 684 if ( $value < 128 ) { 683 if ( $length && ( $unicode_length >= $length ) ) 685 $char = chr( $value ); 686 $encoded_char = $encode_ascii_characters ? rawurlencode( $char ) : $char; 687 $encoded_char_length = strlen( $encoded_char ); 688 if ( $length && ( $unicode_length + $encoded_char_length ) > $length ) { 684 689 break; 685 $unicode .= chr($value); 686 $unicode_length++; 690 } 691 $unicode .= $encoded_char; 692 $unicode_length += $encoded_char_length; 687 693 } else { 688 694 if ( count( $values ) == 0 ) $num_octets = ( $value < 224 ) ? 2 : 3; -
branches/3.7/src/wp-includes/post.php
r43405 r52486 3176 3176 $slug = substr( $slug, 0, $length ); 3177 3177 else 3178 $slug = utf8_uri_encode( $decoded_slug, $length );3178 $slug = utf8_uri_encode( $decoded_slug, $length, true ); 3179 3179 } 3180 3180 -
branches/3.7/src/wp-includes/taxonomy.php
r37142 r52486 811 811 } 812 812 813 $query['terms'] = array_unique( (array) $query['terms'] ); 813 if ( 'slug' === $query['field'] || 'name' === $query['field'] ) { 814 $query['terms'] = array_unique( (array) $query['terms'] ); 815 } else { 816 $query['terms'] = wp_parse_id_list( $query['terms'] ); 817 } 814 818 815 819 if ( is_taxonomy_hierarchical( $query['taxonomy'] ) && $query['include_children'] ) {
Note: See TracChangeset
for help on using the changeset viewer.