From d0098e51bbf9c94264b8da18665f7ec819b6ce3e Mon Sep 17 00:00:00 2001 From: nacin Date: Sun, 5 Dec 2010 02:23:17 +0000 Subject: [PATCH] Unescape ampersands before making an oEmbed request. props Viper007Bond, fixes #14514, see #11311. git-svn-id: http://svn.automattic.com/wordpress/trunk@16728 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/media.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wp-includes/media.php b/wp-includes/media.php index c471518eeb..b066622bac 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -1158,6 +1158,10 @@ class WP_Embed { $rawattr = $attr; $attr = wp_parse_args( $attr, wp_embed_defaults() ); + // kses converts & into & and we need to undo this + // See http://core.trac.wordpress.org/ticket/11311 + $url = str_replace( '&', '&', $url ); + // Look for known internal handlers ksort( $this->handlers ); foreach ( $this->handlers as $priority => $handlers ) {