Skip to content

Commit 152f235

Browse files
Merge branch 'master' into fix-code-and-quote-element
2 parents 8b4e3d2 + 8997183 commit 152f235

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

BBCodePlus/BBCodePlus.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,11 +298,10 @@ function string_process_bbcode( $p_string, $p_multiline = TRUE ) {
298298
if ( ON == $this->t_MantisCoreFormatting_process_urls ) {
299299
$p_string = string_strip_hrefs( $p_string );
300300
}
301-
301+
302302
# convert url-strings into links
303-
$p_string = preg_replace( "/^((http|https|ftp|file):\/\/[a-z0-9;\/\?:@=\&\$\-_\.\+!*'\(\),~%#\|]+)/i", "[url]$1[/url]", $p_string );
304-
$p_string = preg_replace( "/([^='\"(\[url\]|\[img\])])((http|https|ftp|file):\/\/[a-z0-9;\/\?:@=\&\$\-_\.\+!*'\(\),~%#\|]+)/i", "$1[url]$2[/url]", $p_string );
305-
303+
$p_string = preg_replace( "/^((https?|s?ftp|file|irc[6s]?|ssh|telnet|nntp|git|svn(?:\+ssh)?|cvs|mailto):\/\/[a-z0-9;\/\?:@=\&\$\-_\.\+!*'\(\),~%#\|]+)/i", "[url]$1[/url]", $p_string );
304+
$p_string = preg_replace( "/([^='\"(\[url\]|\[img\])])((https?|s?ftp|file|irc[6s]?|ssh|telnet|nntp|git|svn(?:\+ssh)?|cvs|mailto):\/\/[a-z0-9;\/\?:@=\&\$\-_\.\+!*'\(\),~%#\|]+)/i", "$1[url]$2[/url]", $p_string );
306305

307306
# if mantis core formatting plugin process text feature is off, we need to sanitize the html,
308307
# for safety. this is the only functionality we will support when the MantisCoreFormatting plugin is

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ If you would like to contribute to BBCode plus, please [read this guide first](h
2828

2929
### 2.1.11
3030

31-
- Fixed display of quotes when quotee's name contains unicode characters, commas or single quotes [@FSD-Christian-ISS](https://github.com/FSD-Christian-ISS)
31+
- Fixed issue with additional protocols in link insertion.
3232

3333
### 2.1.10
3434

0 commit comments

Comments
 (0)