mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-03 11:59:23 +00:00
Embeds: URL encode YouTube video IDs for broader compatibility.
Merge of [40160] to the 4.3 branch. Built from https://develop.svn.wordpress.org/branches/4.3@40165 git-svn-id: http://core.svn.wordpress.org/branches/4.3@40104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
cddad9e7ee
commit
46c23960dc
@ -2401,7 +2401,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…
x
Reference in New Issue
Block a user