example:
http://www.youtube.com/watch?v=PbWULu5_nXI
above video fails to be embedded when using
[youtube]PbWULu5_nXI[/youtube]
It seems the problem is on line 194 of bbcode-filter.inc. It appears the regex is not even looking out for underscores in the ID. A simple tweak to the regex should have it sorted
Change Line 194 to add _ in regex:
'#\[youtube\]([0-9a-zA-Z]+)
to
'#\[youtube\]([0-9a-zA-Z_]+)
eg:
'#\[youtube\]([0-9a-zA-Z_]+)\[/youtube\]#si' => '<object width="425" height="366"><param name="movie" value="http://www.youtube.com/v/\\1"></param><embed src="http://www.youtube.com/v/\\1" type="application/x-shockwave-flash" width="425" height="366"></embed></object>',
Cheers
J
Comments
Comment #1
naudefj commentedHi,
Problem is already fixed in Drupal 6's BBcode module.
You can apply the fix to your local installation or upgrade to Drupal 6.
Best regards.
Frank
Comment #2
dakku commentedcheers for the reply Frank, D6 upgrade is in the pipeline but for now the work sites are still D5 due to a LOT of custom modules. These will obviously take some time!
I havent tried the D6 branch, but thought the code above would help anyone in the same boat as me. Maybe it should be rolled into any future D5 updates too?
Comment #4
dakku commentedanyone still using D5 brand will notice that videos containing - doesnt work either. change the above line to: