Formatting: Trim leading whitespace in `esc_url()`.
Props toszcze. Fixes #36369. Built from https://develop.svn.wordpress.org/trunk@45578 git-svn-id: http://core.svn.wordpress.org/trunk@45389 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f3ece5149f
commit
abc0f7dd32
|
@ -4202,7 +4202,7 @@ function esc_url( $url, $protocols = null, $_context = 'display' ) {
|
||||||
return $url;
|
return $url;
|
||||||
}
|
}
|
||||||
|
|
||||||
$url = str_replace( ' ', '%20', $url );
|
$url = str_replace( ' ', '%20', ltrim( $url ) );
|
||||||
$url = preg_replace( '|[^a-z0-9-~+_.?#=!&;,/:%@$\|*\'()\[\]\\x80-\\xff]|i', '', $url );
|
$url = preg_replace( '|[^a-z0-9-~+_.?#=!&;,/:%@$\|*\'()\[\]\\x80-\\xff]|i', '', $url );
|
||||||
|
|
||||||
if ( '' === $url ) {
|
if ( '' === $url ) {
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.3-alpha-45577';
|
$wp_version = '5.3-alpha-45578';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue