Skip to content

Commit 419c8d9

Browse files
committed
Embeds: URL encode YouTube video IDs for broader compatibility.
Built from https://develop.svn.wordpress.org/trunk@40160 git-svn-id: http://core.svn.wordpress.org/trunk@40099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 parent 28f838c commit 419c8d9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: wp-includes/embed.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ function wp_maybe_load_embeds() {
226226
*/
227227
function wp_embed_handler_youtube( $matches, $attr, $url, $rawattr ) {
228228
global $wp_embed;
229-
$embed = $wp_embed->autoembed( "https://youtube.com/watch?v={$matches[2]}" );
229+
$embed = $wp_embed->autoembed( sprintf( "https://youtube.com/watch?v=%s", urlencode( $matches[2] ) ) );
230230

231231
/**
232232
* Filters the YoutTube embed output.

Diff for: wp-includes/version.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* @global string $wp_version
66
*/
7-
$wp_version = '4.8-alpha-40148';
7+
$wp_version = '4.8-alpha-40160';
88

99
/**
1010
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

0 commit comments

Comments
 (0)