From d63f346cbc24d834cc1d96978bbf88189c79751f Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Fri, 23 Oct 2015 05:57:24 +0000 Subject: [PATCH] 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 --- wp-includes/formatting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 231c252ae4..bf9a50d2a7 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -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'] ) ) {