~canonical-sysadmins/wordpress/4.8.2

« back to all changes in this revision

Viewing changes to wp-includes/embed.php

  • Committer: axino
  • Date: 2017-03-07 07:21:12 UTC
  • mfrom: (1.1.23 upstream)
  • Revision ID: axino@canonical.com-20170307072112-9g3xb2f6bb0skh02
Merge WP4.7.3 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
226
226
 */
227
227
function wp_embed_handler_youtube( $matches, $attr, $url, $rawattr ) {
228
228
        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] ) ) );
230
230
 
231
231
        /**
232
232
         * Filters the YoutTube embed output.