View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0023738 | mantisbt | markdown | public | 2017-12-17 07:16 | 2024-04-14 07:38 |
Reporter | richardmoss | Assigned To | dregad | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 2.6.0 | ||||
Target Version | 2.27.0 | Fixed in Version | 2.27.0 | ||
Summary | 0023738: Mantis issue links displayed as raw HTML in code block | ||||
Description | Hello, I created an issue which included a stack trace where each line was indented by four spaces to trigger a markdown code block. The stack trace includes #nnn sequences which can either be IL offsets or line numbers. Unfortunately MantisBT treats these as issue links and create hyperlinks if it notices that a matching issue is found. When looking at one of these issues I noticed that the transform is also happening to the markdown code blocks, meaning raw HTML is displayed. For example
Is rendered as
(Note I I stuck an underscore in the first example line in case it triggers the generation of a link on this instance too) | ||||
Steps To Reproduce | Create an issue similar to the following
| ||||
Additional Information | I have included a screenshot shown the full example. I'm a couple of versions out, I find upgrading a bit of a fiddly process - I'll get the instance updated to the latest version presently and update this ticket if anything changes. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
I'm not able to edit the issue, but I see that my example in Steps To Reproduce is being rendered the "corrupt" way - I probably should have stuck underscores between the # and digits there too. |
|
MantisBT: master 3aec6e68 2024-03-31 23:15 grummbeer Committer: dregad Details Diff |
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> |
Affected Issues 0022231, 0022315, 0022320, 0023738, 0024241, 0024628, 0024810, 0034040, 0034393 |
|
mod - plugins/MantisCoreFormatting/MantisCoreFormatting.php | Diff File | ||
mod - plugins/MantisCoreFormatting/core/MantisMarkdown.php | Diff File |