Make WordPress Core


Ignore:
Timestamp:
07/01/2019 03:28:21 AM (6 years ago)
Author:
pento
Message:

Formatting: Trim leading whitespace in esc_url().

Props toszcze.
Fixes #36369.

File:
1 edited

Legend:

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

    r45577 r45578  
    42034203    }
    42044204
    4205     $url = str_replace( ' ', '%20', $url );
     4205    $url = str_replace( ' ', '%20', ltrim( $url ) );
    42064206    $url = preg_replace( '|[^a-z0-9-~+_.?#=!&;,/:%@$\|*\'()\[\]\\x80-\\xff]|i', '', $url );
    42074207
Note: See TracChangeset for help on using the changeset viewer.