Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
bkraul committed Jul 1, 2020
2 parents b00c0d0 + f731317 commit d3a9c04
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
17 changes: 8 additions & 9 deletions BBCodePlus/BBCodePlus.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function register() {
$this->name = plugin_lang_get( 'title' );
$this->description = plugin_lang_get( 'description' );
$this->page = 'config';
$this->version = '2.1.11';
$this->version = '2.1.14';

$this->requires['MantisCore'] = '2.0.0';
# this plugin can coexist with MantisCoreFormatting.
Expand Down Expand Up @@ -216,15 +216,14 @@ public function rss( $p_event, $p_string ) {
* @return string Formatted text
*/
public function email( $p_event, $p_string ) {
#$p_string = string_strip_hrefs( $p_string );
#$p_string = string_process_bug_link( $p_string, FALSE );
#$p_string = string_process_bugnote_link( $p_string, FALSE );
#$p_string = $this->string_process_cvs_link( $p_string, FALSE );

if ( ON == plugin_config_get( 'process_email' ) )
if ( ON == plugin_config_get( 'process_email' ) ) {
# process content to make sure all tags are converted to BBCode.
$p_string = $this->string_process_bbcode( $p_string );
else
$p_string = $this->string_strip_bbcode( $p_string );
}
# strip the BBCode right back out. mantisbt email does not currently support HTML.
$p_string = $this->string_strip_bbcode( $p_string );

return $p_string;
}
//-------------------------------------------------------------------
Expand Down Expand Up @@ -278,7 +277,7 @@ function add_tags() {
$this->t_bbCode->addParser('code-lang-ln', '/\[code=(\w*)\ start=([0-9]+)\](.*?)\[\/code\]/s',
'<pre class="bbcodeplus pre line-numbers" data-start="$2"><code class="bbcodeplus code language-$1">$3</code></pre>', '$3');
$this->t_bbCode->addParser('quote', '/\[quote\](.*?)\[\/quote\]/s', '<blockquote class="bbcodeplus blockquote">$1</blockquote>', '$1');
$this->t_bbCode->addParser('named-quote', '/\[quote=([\s\w]*)\](.*?)\[\/quote\]/s',
$this->t_bbCode->addParser('named-quote', '/\[quote=([\s\w,\'\.@-]*)\](.*?)\[\/quote\]/su',
'<blockquote class="bbcodeplus blockquote"><p class="mb-0">$2</p><footer class="bbcodeblus blockquote-footer"><cite title="$1">$1</cite></footer></blockquote>',
'$1 wrote: $2');
}
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@ If you would like to contribute to BBCode plus, please [read this guide first](h

## Change Log

### 2.1.14

- Corrected email parsing behavior when Email Processing is turned on. MantisBT does not support HTML email natively.

### 2.1.13

- 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)

### 2.1.12

- Fixed display of quotes when quotee's name contains unicode characters, commas or single quotes [@FSD-Christian-ISS](https://github.com/FSD-Christian-ISS)

### 2.1.11

- Fixed issue with additional protocols in link insertion.
Expand Down

0 comments on commit d3a9c04

Please sign in to comment.