[youtube] embedding doesn't work with a - in the youtube id
XBleed - July 10, 2008 - 13:59
| Project: | Bbcode |
| Version: | 5.x-1.1 |
| Component: | BBCode Tags |
| Category: | bug report |
| Priority: | normal |
| Assigned: | naudefj |
| Status: | closed |
Jump to:
Description
Much similar to this previously reported issue:
http://drupal.org/node/229875
Only it doesn't work with a dash, and I'm unsure how to fix it since the dash is used to tell php to look through the set of given letters and numbers.
Thanks.

#1
'#\[youtube\]([0-9a-zA-Z\-]+)\[/youtube\]#si'
Change to this.
in bbcode-filter.inc I believe.
#2
I tried this and it seems to work, but when combined with this issue:
http://drupal.org/node/229875
I added both characters (underscore and dash) to the string, like this:
'#\[youtube\]([0-9a-zA-Z_\-]+)\[/youtube\]#si'
It seems to work for one case, and it works for the other, but it doesn't work for IDs that have BOTH a dash and an underscore, like this one:
[youtube]-HZD_h93C5I[/youtube]
Weird.
EDIT: Nevermind, it seems I need to run the database update script every time I change the bbcode-filter.inc file.
#3
Close as a duplicate of http://drupal.org/node/229875
#4
Fix applied to CVS.
See http://drupal.org/cvs?commit=155779
#5
Automatically closed -- issue fixed for two weeks with no activity.