Use `wp_parse_url()` in `esc_url()` to avoid parsing bugs in < PHP 5.4.7.
Props johnbillion for unit tests See #34408 Fixes #34202 Built from https://develop.svn.wordpress.org/trunk@35370 git-svn-id: http://core.svn.wordpress.org/trunk@35334 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7912c647ae
commit
d63f346cbc
|
@ -3398,7 +3398,7 @@ function esc_url( $url, $protocols = null, $_context = 'display' ) {
|
|||
|
||||
if ( ( false !== strpos( $url, '[' ) ) || ( false !== strpos( $url, ']' ) ) ) {
|
||||
|
||||
$parsed = parse_url( $url );
|
||||
$parsed = wp_parse_url( $url );
|
||||
$front = '';
|
||||
|
||||
if ( isset( $parsed['scheme'] ) ) {
|
||||
|
|
Loading…
Reference in New Issue