MantisBT ignoring CODE wrappers

just tried to insert an example of code in a bug report. No matter what suggested method to suppress rendering HTML markup, the markup was still applied:

Tried:
indent 2 spaces, <code> </code>, <pre> </pre>, && &&, <nowiki> </nowiki>, backticks, triple backtick, &lt;

see “Additional Information” in:

We don’t have markdown enabled in the bug tracker.

I seem to remember that this has been discussed before. There are a few formatting options available in Mantis BT including Markdown, DocuWiki and BBCode. We currently only have the basic formatting options enabled.

Markdown is probably the most sensible option. I think that enabling it will affect all notes including existing ones.

Some markdown IS enabled. It is rendering HTML tags for bold, italics, underline … and is hiding < symbols.

The problem is that the overrides are not working.

So it cannot show some (unrendered) code from @prculley’s Note Cleanup tool that included HTML tags.

Yes. See below:

My question is: how can the rendering of styling be overridden?

There are times that it is necessary to show code

And none of the standard methods to do that are working

I suggest that someone reads the documentation.

We can enable Markdown, DocuWiki, BBCode or some other formatting in addition to the default. They all probably have advantages and disadvantages.

MantisBT seems to have Admin docs but not user docs.

I ran through all the code overrides that were listed … but without success.

I’ve enabled markup and put the error details of bug #13862 into a code block as an example. Is this what we want?

Would users prefer DocuWiki or BBCode? We could choose either of these instead.

The marking method is invisible. What code block tagging did you use? I’d like to try it with my lower rights on 13870.

(And, although unlikely, it is possible that the different form sections have different restrictions. So I’d like to test in the Description, Steps to Reproduce, Addition Information and Add Note sections.)

I used triple backticks.

The triple backticks are being recognized now. Thanks for whatever was changed.

But MantisBT is still doing something wonky. I cannot get this particular report to stop converting < to &lt; and double quotes being converted to &quot;

It is strange.

I do not know what the others think but… we’ve survived decades of MantisBT with minimal markup. It doesn’t seem like we need fancy ‘styling’… just screen captures, code inclusions attachments, and links.

There has been a change to MantisBT on/about May 30, 2025.
Was it the intention to disable the use of HTML tags to markup text?

The use of HTML within Mantis text regions has apparently been disabled.

I wonder if there was some change to:
file mantisbt/config_defaults_inc.php
lines used to be:
$g_html_valid_tags = ‘p, li, ul, ol, br, pre, i, b, u, em, strong’;
$g_html_valid_tags_single_line = ‘i, b, u, em, strong’;

(note Gramps Feature request #0011928)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Recently reported bugs with calls stacks have strange formatting, some of which can be ignored, e.g. large heading style for sections. However, the problematic formatting is with call stacks - part of the call stack is often in a quoted block, and often the last line(s) of the call stack get merged into the formatted block for system info.

This makes it difficult to read call stacks, and very it is very easy to miss parts of the call stack when trying to copy-and-paste it outside Mantis for easier readability.

Here’s one example: Bug 13919 and here’s another Bug 13884

What’s changed recently that caused this?

i think it was coincident with a change that also disabled the use of HTML tags in text fields in MantisBT problem reports.

0011928: MantisBT: Enable additional markup tags s and/or del

1 Like

@lordemannd Thanks for digging up the link.

I’m late to the game as others have already reported this. There seem to be many people with specific requests on this topic and I don’t want to add any more, as long as whatever markup method is chosen results in simple and clean bug reports, including the callstack.

Also, I see that the examples but reports I shared have been cleaned up. Thanks, @Nick-Hall

1 Like

Yes. I listed the different options available, and finally decided to enable markdown since I think that most people will be familiar with it to some extent.

Unfortunately, their markdown support is squirrelly with code snippet markers. Ignoring indents and needing extra markdown for <.

And support for exact code, XML, CSV, GEDCOM, and JSON is absolutely critical.

Pretty markdown is only “nice to have”