WordPress.org

Make WordPress Core

Ticket #36369: 36369.diff

File 36369.diff, 459 bytes (added by toszcze, 4 years ago)
  • wp-includes/formatting.php

     
    33723372        if ( '' == $url )
    33733373                return $url;
    33743374
    3375         $url = str_replace( ' ', '%20', $url );
     3375        $url = str_replace( ' ', '%20', ltrim( $url ) );
    33763376        $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\|*\'()\[\]\\x80-\\xff]|i', '', $url);
    33773377
    33783378        if ( '' === $url ) {