Ticket #17923: 17923.5.patch
File 17923.5.patch, 1000 bytes (added by , 12 years ago) |
---|
-
wp-includes/functions.php
633 633 * @param mixed $param1 Either newkey or an associative_array 634 634 * @param mixed $param2 Either newvalue or oldquery or uri 635 635 * @param mixed $param3 Optional. Old query or uri 636 * @param bool $encode Optional. If true, values will be rawurlencode()'d 636 637 * @return string New URL query string. 637 638 */ 638 639 function add_query_arg() { … … 686 687 $qs = urlencode_deep( $qs ); // this re-URL-encodes things that were already in the query string 687 688 if ( is_array( $args[0] ) ) { 688 689 $kayvees = $args[0]; 690 if ( !empty( $args[3] ) ) 691 $kayvees = array_map( 'rawurlencode', $kayvees ); 689 692 $qs = array_merge( $qs, $kayvees ); 690 693 } else { 691 694 $qs[ $args[0] ] = $args[1]; 695 if ( !empty( $args[3] ) ) 696 $qs[ $args[0] ] = rawurlencode( $qs[ $args[0] ] ); 692 697 } 693 698 694 699 foreach ( $qs as $k => $v ) {