From 45230b5fc72268825a08ecba29876a93f05dbfe1 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Wed, 7 Oct 2015 21:43:25 +0000 Subject: [PATCH] Correctly encode the `url` parameter that gets passed to WordPress' own oEmbed endpoint URL. Fixes #34193 Props ocean90 Built from https://develop.svn.wordpress.org/trunk@34915 git-svn-id: http://core.svn.wordpress.org/trunk@34880 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/embed-functions.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/embed-functions.php b/wp-includes/embed-functions.php index 514eac3ca8..d3c78dd829 100644 --- a/wp-includes/embed-functions.php +++ b/wp-includes/embed-functions.php @@ -423,7 +423,7 @@ function get_oembed_endpoint_url( $permalink = '', $format = 'json' ) { if ( '' !== $permalink ) { $url = add_query_arg( array( - 'url' => $permalink, + 'url' => urlencode( $permalink ), 'format' => $format, ), $url ); } @@ -851,4 +851,4 @@ function print_oembed_embed_scripts() { ?>