Embeds: URL encode YouTube video IDs for broader compatibility.
Merge of [40160] to the 4.4 branch. git-svn-id: https://develop.svn.wordpress.org/branches/4.4@40164 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f1a6970d09
commit
b83078adfd
@ -251,7 +251,7 @@ function wp_embed_handler_googlevideo( $matches, $attr, $url, $rawattr ) {
|
||||
*/
|
||||
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] ) ) );
|
||||
|
||||
/**
|
||||
* Filter the YoutTube embed output.
|
||||
|
Loading…
Reference in New Issue
Block a user