WordPress.org

Make WordPress Core

Changeset 5261


Ignore:
Timestamp:
04/12/07 22:00:22 (7 years ago)
Author:
rob1n
Message:

Get add_query_arg() to urlencode all values of parse_str array. Props mdawaffe. fixes #4084

Location:
trunk/wp-includes
Files:
2 edited

Legend:

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

    r5227 r5261  
    582582 
    583583 
    584 function stripslashes_deep($value) 
    585 { 
     584function stripslashes_deep($value) { 
    586585     $value = is_array($value) ? 
    587                              array_map('stripslashes_deep', $value) : 
    588                              stripslashes($value); 
     586         array_map('stripslashes_deep', $value) : 
     587         stripslashes($value); 
     588 
     589     return $value; 
     590} 
     591 
     592function urlencode_deep($value) { 
     593     $value = is_array($value) ? 
     594         array_map('urlencode_deep', $value) : 
     595         urlencode($value); 
    589596 
    590597     return $value; 
  • trunk/wp-includes/functions.php

    r5248 r5261  
    809809    if ( get_magic_quotes_gpc() ) 
    810810        $qs = stripslashes_deep($qs); // parse_str() adds slashes if magicquotes is on.  See: http://php.net/parse_str 
     811    $qs = urlencode_deep($qs); 
    811812    if ( is_array(func_get_arg(0)) ) { 
    812813        $kayvees = func_get_arg(0); 
Note: See TracChangeset for help on using the changeset viewer.