Skip to content
Permalink
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ocean90 committed Mar 6, 2017
1 parent 28f838c commit 419c8d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion wp-includes/embed.php
Expand Up @@ -226,7 +226,7 @@ function wp_maybe_load_embeds() {
*/
function wp_embed_handler_youtube( $matches, $attr, $url, $rawattr ) {
global $wp_embed;
$embed = $wp_embed->autoembed( "https://youtube.com/watch?v={$matches[2]}" );
$embed = $wp_embed->autoembed( sprintf( "https://youtube.com/watch?v=%s", urlencode( $matches[2] ) ) );

/**
* Filters the YoutTube embed output.
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/version.php
Expand Up @@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.8-alpha-40148';
$wp_version = '4.8-alpha-40160';

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

0 comments on commit 419c8d9

Please sign in to comment.