From 8ab8f72c4037c9394fed4a48e44716d1080596a5 Mon Sep 17 00:00:00 2001 From: Marco Wobben Date: Fri, 10 Apr 2026 11:48:45 +0200 Subject: [PATCH] Fix conflict between BBCodePlus and MantisCoreFormatting Markdown When MantisCoreFormatting's Markdown mode is active, BBCodePlus was calling string_strip_hrefs() which destroyed links rendered by the Markdown parser (e.g. [text](url) -> text -> "text"). Skip string_strip_hrefs when Markdown is active so Markdown-generated links survive BBCodePlus's HTML->BBCode->HTML round-trip intact. BBCode [tag] syntax and Markdown **syntax** are orthogonal and do not conflict, so both plugins can be active simultaneously. This allows sites with a mix of legacy BBCode tickets and newer Markdown tickets to display correctly without disabling either plugin. Removes the conflict warning in content_begin() as it is no longer needed. --- BBCodePlus/BBCodePlus.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/BBCodePlus/BBCodePlus.php b/BBCodePlus/BBCodePlus.php index d830256..f28ae75 100644 --- a/BBCodePlus/BBCodePlus.php +++ b/BBCodePlus/BBCodePlus.php @@ -85,13 +85,9 @@ function init() { * @return void */ function content_begin() { - if ( ON == $this->t_MantisCoreFormatting_process_markdown ) { - # display a warning if markdown processing is on. - $output = '
'. - plugin_lang_get( 'title' ) . ': '. plugin_lang_get( 'markdown_warning' ) . '
'; - } else { - $output = ''; - } + # BBCodePlus and MantisCoreFormatting Markdown can coexist: BBCode [tag] syntax and + # Markdown **syntax** are orthogonal and do not interfere with each other. + $output = ''; # add image picker modal. $output .= '