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
54a267fc
Commit
54a267fc
authored
5 years ago
by
naudefj
Browse files
Options
Downloads
Patches
Plain Diff
Fix PHP preg_match(): Compilation failed: invalid range in character class at offset
parent
ecdbbf1d
Branches
master
Tags
7.x-3.0
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bbcode-filter.inc
+4
-4
4 additions, 4 deletions
bbcode-filter.inc
with
4 additions
and
4 deletions
bbcode-filter.inc
+
4
−
4
View file @
54a267fc
...
...
@@ -237,15 +237,15 @@ function _bbcode_filter_process(&$body, $settings) {
// Flash animations and other special effects
'#\[flash=(\d+)x(\d+)(?::\w+)?\]([\w:;&,~%+!=@\/\.\-\#\?]+)\[/flash(?::\w+)?\]#si'
=>
'<object type="application/x-shockwave-flash" data="\\3" width="\\1" height="\\2"><param name="movie" value="\\3" /></object>'
,
// Acronyms & abbreviations - show description when mouse moves over tag
'#\[acronym=([\w\s-,\.]+)(?::\w+)?\](.*?)\[/acronym(?::\w+)?\]#si'
=>
'<acronym title="\\1">\\2</acronym>'
,
'#\[abbr=([\w\s-,\.]+)(?::\w+)?\](.*?)\[/abbr(?::\w+)?\]#si'
=>
'<abbr title="\\1">\\2</abbr>'
,
'#\[acronym=([\w\s
\
-,\.]+)(?::\w+)?\](.*?)\[/acronym(?::\w+)?\]#si'
=>
'<acronym title="\\1">\\2</acronym>'
,
'#\[abbr=([\w\s
\
-,\.]+)(?::\w+)?\](.*?)\[/abbr(?::\w+)?\]#si'
=>
'<abbr title="\\1">\\2</abbr>'
,
// Quoting with or without specifying the source
'#\[quote(?::\w+)?\]#i'
=>
'<div class="bb-quote">'
.
$quote_text
.
'<blockquote class="bb-quote-body">'
,
'#\[quote=(?:"|"|\')?(.*?)["\']?(?:"|"|\')?\]#i'
=>
'<div class="bb-quote"><b>'
.
$quote_user
.
'</b><blockquote class="bb-quote-body">'
,
'#\[/quote(?::\w+)?\]#si'
=>
'</blockquote></div>'
,
// 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>'
,
'#\[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'
=>
'<iframe width="425" height="366" src="//www.youtube.com/embed/\\1" frameborder="0" allowfullscreen></iframe>'
,
// Table tags
'#\[table\](.+?)\[/table\]#si'
=>
'<table class="bb-table">\\1</table>'
,
...
...
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