MantisBT: master 3aec6e68

Author Committer Branch Timestamp Parent
grummbeer dregad master 2024-03-31 23:15 master 6ddc26bd
Affected Issues  0022231: Fix unit tests for markdown
 0022315: Markdown converts " to `"` within code blocks and inline code
 0022320: Don't expand issue ids into URLs within code blocks
 0023738: Mantis issue links displayed as raw HTML in code block
 0024241: $g_html_valid_tags are not rendered if Markdown is enabled
 0024628: Double quotes " and lesser than sign < are shown as HTML entity within Markdown code blocks
 0024810: Markdown links/code always show HTML entities for Ampersand and Less-than sign
 0034040: Markdown processing code cleanup (part 2)
 0034393: Incorrect handling of HTML hexadecimal character references `&#xNNN;`
Changeset

Clean up markdown processing

  • Process input via Markdownparser and return the result, no further
    text processing.
  • During parsing, catch all <code> blocks and replace them with a hash
    value.
  • After the markup is returned from Parsedown, apply mentions and links
  • Restore the untouched <code> Blocks back in place.

Fixes 0034040, PR https://github.com/mantisbt/mantisbt/pull/1976
Also fixes 0022315, 0022320, 0024241, 0024628, 0024810, 0022231, 0023738

Signed-off-by: Damien Regad dregad@mantisbt.org

mod - plugins/MantisCoreFormatting/MantisCoreFormatting.php Diff File
mod - plugins/MantisCoreFormatting/core/MantisMarkdown.php Diff File