Skip to content

Commit d3a9c04

Browse files
author
bkraul
committed
Merge branch 'master' into develop
2 parents b00c0d0 + f731317 commit d3a9c04

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed

BBCodePlus/BBCodePlus.php

Lines changed: 8 additions & 9 deletions
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.11';
25+
$this->version = '2.1.14';
2626

2727
$this->requires['MantisCore'] = '2.0.0';
2828
# this plugin can coexist with MantisCoreFormatting.
@@ -216,15 +216,14 @@ public function rss( $p_event, $p_string ) {
216216
* @return string Formatted text
217217
*/
218218
public function email( $p_event, $p_string ) {
219-
#$p_string = string_strip_hrefs( $p_string );
220-
#$p_string = string_process_bug_link( $p_string, FALSE );
221-
#$p_string = string_process_bugnote_link( $p_string, FALSE );
222-
#$p_string = $this->string_process_cvs_link( $p_string, FALSE );
223219

224-
if ( ON == plugin_config_get( 'process_email' ) )
220+
if ( ON == plugin_config_get( 'process_email' ) ) {
221+
# process content to make sure all tags are converted to BBCode.
225222
$p_string = $this->string_process_bbcode( $p_string );
226-
else
227-
$p_string = $this->string_strip_bbcode( $p_string );
223+
}
224+
# strip the BBCode right back out. mantisbt email does not currently support HTML.
225+
$p_string = $this->string_strip_bbcode( $p_string );
226+
228227
return $p_string;
229228
}
230229
//-------------------------------------------------------------------
@@ -278,7 +277,7 @@ function add_tags() {
278277
$this->t_bbCode->addParser('code-lang-ln', '/\[code=(\w*)\ start=([0-9]+)\](.*?)\[\/code\]/s',
279278
'<pre class="bbcodeplus pre line-numbers" data-start="$2"><code class="bbcodeplus code language-$1">$3</code></pre>', '$3');
280279
$this->t_bbCode->addParser('quote', '/\[quote\](.*?)\[\/quote\]/s', '<blockquote class="bbcodeplus blockquote">$1</blockquote>', '$1');
281-
$this->t_bbCode->addParser('named-quote', '/\[quote=([\s\w]*)\](.*?)\[\/quote\]/s',
280+
$this->t_bbCode->addParser('named-quote', '/\[quote=([\s\w,\'\.@-]*)\](.*?)\[\/quote\]/su',
282281
'<blockquote class="bbcodeplus blockquote"><p class="mb-0">$2</p><footer class="bbcodeblus blockquote-footer"><cite title="$1">$1</cite></footer></blockquote>',
283282
'$1 wrote: $2');
284283
}

README.md

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

2727
## Change Log
2828

29+
### 2.1.14
30+
31+
- Corrected email parsing behavior when Email Processing is turned on. MantisBT does not support HTML email natively.
32+
33+
### 2.1.13
34+
35+
- Added the following characters to work with the quotee's name in the named quote function (basically to support email-adresses here): . @ - [@FSD-Christian-ISS](https://github.com/FSD-Christian-ISS)
36+
37+
### 2.1.12
38+
39+
- Fixed display of quotes when quotee's name contains unicode characters, commas or single quotes [@FSD-Christian-ISS](https://github.com/FSD-Christian-ISS)
40+
2941
### 2.1.11
3042

3143
- Fixed issue with additional protocols in link insertion.

0 commit comments

Comments
 (0)