mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-13 06:07:23 +01:00
Embeds: URL encode YouTube video IDs for broader compatibility.
Merge of [40160] to the 4.6 branch. Built from https://develop.svn.wordpress.org/branches/4.6@40162 git-svn-id: http://core.svn.wordpress.org/branches/4.6@40101 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
fe1162e5f1
commit
e61cac5d13
@ -212,7 +212,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.
|
||||
|
Loading…
Reference in New Issue
Block a user