Make WordPress Core

Changeset 6070


Ignore:
Timestamp:
09/10/2007 03:53:34 PM (17 years ago)
Author:
markjaquith
Message:

Actually, we always need to URLencode square brackets... or wp_redirect() will strip them out. see #4935. see #4878

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/compat.php

    r6069 r6070  
    108108function _http_build_query($data, $prefix=null, $sep=null, $key='', $urlencode=true) {
    109109    $ret = array();
    110     if ( $urlencode ) {
    111         $lsb = '%5B';
    112         $rsb = '%5D';
    113     } else {
    114         $lsb = '[';
    115         $rsb = ']';
    116     }
     110
    117111    foreach ( (array) $data as $k => $v ) {
    118112        if ( $urlencode)
     
    121115            $k = $prefix.$k;
    122116        if ( !empty($key) )
    123             $k = $key . $lsb . $k . $rsb;
     117            $k = $key . '%5B' . $k . '%5D';
    124118        if ( $v === NULL )
    125119            continue;
Note: See TracChangeset for help on using the changeset viewer.