Skip to content
Snippets Groups Projects
Commit b9a0fec9 authored by naudefj's avatar naudefj
Browse files

#166167 by Liam McDermott: Add [youtube] tag

parent 524fe6cd
Branches master
Tags 7.x-3.0
No related merge requests found
......@@ -191,6 +191,7 @@ function _bbcode_filter_process(&$body, $format = -1) {
// Links to popular sites
'#\[google(?::\w+)?\]([\w\s-]+?)\[/google(?::\w+)?\]#si' => '<a href="http://www.google.com/search?q=\\1">\\1</a>',
'#\[wikipedia(?::\w+)?\]([\w\s-]+?)\[/wikipedia(?::\w+)?\]#si' => '<a href="http://www.wikipedia.org/wiki/\\1">\\1</a>',
'#\[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>',
// Table tags
'#\[table\](.+?)\[/table\]#si' => '<table border>\\1</table>',
......
......@@ -69,6 +69,7 @@ Some URL's within a sentence: http://url1.com; www.url2.com, (www.url3.com) and
Google link: [google]BBCode[/google]
Wikipedia link: [wikipedia]BBCode[/wikipedia]
Youtube video: [youtube]0Q2aPi9ZEgs[/youtube]
[h3]E-mail addresses[/h3]
Test@Mail.com
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment