Skip to content

Commit 8997183

Browse files
authored
Merge pull request #84 from bkraul/develop
Develop
2 parents 3473081 + b00c0d0 commit 8997183

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

BBCodePlus/BBCodePlus.php

+4-5
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function register() {
2222
$this->name = plugin_lang_get( 'title' );
2323
$this->description = plugin_lang_get( 'description' );
2424
$this->page = 'config';
25-
$this->version = '2.1.10';
25+
$this->version = '2.1.11';
2626

2727
$this->requires['MantisCore'] = '2.0.0';
2828
# this plugin can coexist with MantisCoreFormatting.
@@ -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

+4
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ If you would like to contribute to BBCode plus, please [read this guide first](h
2626

2727
## Change Log
2828

29+
### 2.1.11
30+
31+
- Fixed issue with additional protocols in link insertion.
32+
2933
### 2.1.10
3034

3135
- Fixed rendering issue of code blocks when language parameter was left empty

0 commit comments

Comments
 (0)