If youtube video address has "feature=player_embedded&" in it, video does not displays. Example:

Members fund testing for the Drupal project. Drupal Association Learn more


mr.alinaki’s picture

And here comes the fix!


blackdog’s picture

Where do you get an URL like that?

kmonty’s picture

I agree that this is a common issue with content editors. YouTube videos are often grabbed from videos embedded on other sites, and when you click the link within the embed, it attaches a "filtered" query to the video.

+1 on fixing.

drupik’s picture

@mr.alinaki - nice one song :D

blackdog’s picture

Status: Active » Needs work

I'm in favor of fixing it, but the regexp in #1 doesn't work.

TravisCarden’s picture

Status: Needs work » Needs review

What about this?


This would match any valid query string containing v=whatever. That way you don't have to know all the valid variables (or account for new ones when they're added to the API in the future). It breaks down like this:

  • youtube.com/watch?
  • zero or more sets of var=val&
  • v=whatever
  • zero or more sets of &var=val
mherchel’s picture

This is a very common use case.

I tried adding the regex from #1 and #6 into new lines within video_filter.codecs.inc, and also tried replacing line with it.

It didn't work though. The URL that I'm trying to get to work is


Martijn Houtman’s picture


More robust and matches the above cases.

Martijn Houtman’s picture

Typo, it should read:


Martijn Houtman’s picture

OK, I just ran into this URL: http://www.youtube.com/watch?feature=g-all-esi&v=Ln5K3_8Cxrc

So the regex should read:


My list two cents for now :-)

Ken Hawkins’s picture

The regexs listed before likely weren't working with WYSIWYGs as the "&" is converted to "&"

Updated the regex from #10 to:


Adds the optional detection of (?:amp;)

Things are working well for us now.

Patch attached.

kmonty’s picture

Title: Youtube and "featured" » YouTube embeds not working properly when "featured" is in the query string
Priority: Normal » Major
DamienMcKenna’s picture

Adding this to the proposed issues list for the 3.2 release.

DamienMcKenna’s picture

Status: Needs review » Closed (duplicate)
Parent issue: #2297491: Plan for Video Filter v7.x-3.2 release »
Related issues: +#2030795: Allow more flexible Youtube URLs

Actually I'm going to close this in favor of #2030795: Allow more flexible Youtube URLs which also adds support for youtube.com/embed URLs.