Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bbcode-3205761
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
bbcode-3205761
Commits
b9a0fec9
Commit
b9a0fec9
authored
17 years ago
by
naudefj
Browse files
Options
Downloads
Patches
Plain Diff
#166167
by Liam McDermott: Add [youtube] tag
parent
524fe6cd
Branches
master
Tags
7.x-3.0
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bbcode-filter.inc
+1
-0
1 addition, 0 deletions
bbcode-filter.inc
bbcode-test.txt
+1
-0
1 addition, 0 deletions
bbcode-test.txt
with
2 additions
and
0 deletions
bbcode-filter.inc
+
1
−
0
View file @
b9a0fec9
...
...
@@ -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>'
,
...
...
This diff is collapsed.
Click to expand it.
bbcode-test.txt
+
1
−
0
View file @
b9a0fec9
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment