Skip to content

Commit c215e5b

Browse files
authored
Merge pull request #80 from bkraul/develop-1.3.x
Develop 1.3.x
2 parents d0e224a + a24acbc commit c215e5b

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

BBCodePlus/BBCodePlus.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function register() {
2121
$this->name = plugin_lang_get( 'title' );
2222
$this->description = plugin_lang_get( 'description' );
2323
$this->page = 'config';
24-
$this->version = '1.3.7';
24+
$this->version = '1.3.9';
2525

2626
$this->requires['MantisCore'] = '1.3.0';
2727
# this plugin can coexist with MantisCoreFormatting.
@@ -275,6 +275,12 @@ function string_process_bbcode( $p_string, $p_multiline = TRUE ) {
275275
if ( ON == $this->t_MantisCoreFormatting_process_urls ) {
276276
$p_string = string_strip_hrefs( $p_string );
277277
}
278+
279+
# convert url-strings into links
280+
$p_string = preg_replace( "/^((http|https|ftp|file):\/\/[a-z0-9;\/\?:@=\&\$\-_\.\+!*'\(\),~%#\|]+)/i", "[url]$1[/url]", $p_string );
281+
$p_string = preg_replace( "/([^='\"(\[url\]|\[img\])])((http|https|ftp|file):\/\/[a-z0-9;\/\?:@=\&\$\-_\.\+!*'\(\),~%#\|]+)/i", "$1[url]$2[/url]", $p_string );
282+
283+
278284
# if mantis core formatting plugin process text feature is off, we need to sanitize the html,
279285
# for safety. this is the only functionality we will support when the MantisCoreFormatting plugin is
280286
# not enabled or when the text processing is disabled.

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ If you would like to contribute to BBCode plus, please [read this guide first](h
2525

2626
## Change Log
2727

28+
### 1.3.9
29+
30+
- Fixed display issue of loose links (thanks to [@FSD-Christian-ISS](https://github.com/FSD-Christian-ISS) )
31+
2832
### 1.3.8
2933

3034
- Removed leftover debug call that was breaking display.

0 commit comments

Comments
 (0)