[youtube] tag does not work for Youtube ID containing underscore _

gaobin - March 4, 2008 - 16:11
Project:Bbcode
Version:5.x-2.1
Component:BBCode Tags
Category:bug report
Priority:normal
Assigned:gaobin
Status:closed
Description

I tried to link a Youtube video, http://www.youtube.com/watch?v=CoSL_qayMCc , on my website using [youtube]CoSL_qayMCc[/youtube] . However, it doesn't work. The flash doesn't show up. I think bbcode filter doesn't know to process Youtube ID containing underscore (_). It works fine with anything else without underscore.

Does anyone know how to fix it? Your help is highly appreciated!

#1

gaobin - March 4, 2008 - 18:16
Assigned to:Anonymous» gaobin
Status:active» fixed

fixed!

I added underscore (_) to the code related to youtube video in bbcode-filter.inc.

'#\[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>',

New code will work only if we clear page and css caches.

#2

Anonymous (not verified) - March 18, 2008 - 18:22
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.