Make WordPress Core


Ignore:
Timestamp:
09/02/2015 05:19:29 PM (10 years ago)
Author:
johnbillion
Message:

Correctly encode spaces in URLs passed to esc_url() instead of removing them.

Fixes #23605
Props enshrined, johnbillion

File:
1 edited

Legend:

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

    r33734 r33858  
    32753275    if ( '' == $url )
    32763276        return $url;
     3277
     3278    $url = str_replace( ' ', '%20', $url );
    32773279    $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\|*\'()\\x80-\\xff]|i', '', $url);
    32783280    if ( 0 !== stripos( $url, 'mailto:' ) ) {
     
    32803282        $url = _deep_replace($strip, $url);
    32813283    }
     3284
    32823285    $url = str_replace(';//', '://', $url);
    32833286    /* If the URL doesn't appear to contain a scheme, we
Note: See TracChangeset for help on using the changeset viewer.