[wp-trac] [WordPress Trac] #40866: Video widget does not successfully play several permutations of YouTube URLs

WordPress Trac noreply at wordpress.org
Thu May 25 23:05:00 UTC 2017


#40866: Video widget does not successfully play several permutations of YouTube
URLs
--------------------------------------+--------------------
 Reporter:  jnylen0                   |       Owner:
     Type:  defect (bug)              |      Status:  new
 Priority:  normal                    |   Milestone:  4.8
Component:  Widgets                   |     Version:  trunk
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+--------------------
Changes (by timmydcrawford):

 * keywords:  needs-patch => has-patch has-unit-tests


Comment:

 In [[attachment:40866.1.diff]] I have added logic to
 {{{wp_video_shortcode()}}} to fix the issues noted above for YouTube and
 Vimeo urls in the mediaelement player.  The YouTube fix specifically
 targets the problematic argument of {{{feature}}} which was the common
 failing point between @jnylen0 's bug report, and the issue noted in the
 mejs repository too.

 A part of me things we could go a step further here and filter out only
 approved YouTube parameters (
 https://developers.google.com/youtube/player_parameters ) - but even then
 someone could mangle a URL and include {{{youtu.be}}} in a query argument
 and cause mejs to break.  So I considered replacing all occurrences of
 {{{youtu.be}}} in the query string, but my concern is it might be valid in
 some URLs... YouTube has a wide variety of supported urls - so in the end
 I opted to remove the one usage we know was causing the breakage.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40866#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list