What is the tag that needs to be put around a block of code in a mantis comment so it won't interpret html tags or special chars like ~ or #
EDIT: Example, if someone wants to add a backtrace and not have all the strings prepended with '#' be interpreted as an mantisbt issue number
enclosing code in comments so mantis doesn't interpret
Moderators: Developer, Contributor
Re: enclosing code in comments so mantis doesn't interpret
This is not possible out of the box.
You can just deactivate the whole special treatment for ~ and # by using the configuration page of the MantisCoreFormatting plugin.
You can just deactivate the whole special treatment for ~ and # by using the configuration page of the MantisCoreFormatting plugin.
Re: enclosing code in comments so mantis doesn't interpret
Yea.. that's not the answer I was hoping for.atrol wrote:This is not possible out of the box.
You can just deactivate the whole special treatment for ~ and # by using the configuration page of the MantisCoreFormatting plugin.
What are other workarounds ?
Re: enclosing code in comments so mantis doesn't interpret
Workarounds (not really):
1) If you start from scratch you could change the bug link tag by adding the following line to file config_inc.php, and adjust to your needs, something where you think it will not appear in normal text, e.g.
2) I had a look at the example you mentioned in IRC
You could attach traces as text files instead of posting them in field additional information.
Solution
Introduce a new option in Mantis (or better an option in MantisCoreFormatting plugin.), e.g. something like $g_no_link_tag = 'nolink';
To allow posts like
<nolink>This is no link for issue #4711</nolink>
1) If you start from scratch you could change the bug link tag by adding the following line to file config_inc.php, and adjust to your needs, something where you think it will not appear in normal text, e.g.
Code: Select all
$g_bug_link_tag = 'bug#';
You could attach traces as text files instead of posting them in field additional information.
Solution
Introduce a new option in Mantis (or better an option in MantisCoreFormatting plugin.), e.g. something like $g_no_link_tag = 'nolink';
To allow posts like
<nolink>This is no link for issue #4711</nolink>
Re: enclosing code in comments so mantis doesn't interpret
Yea.. see if I take workaround #1 then all previous issues that use that formatting break.
Attaching traces as texts is not ideal, but I see the ingenuity in it.
I think the <nolink> solution is the best one. Will it also not interpret html tags?
Attaching traces as texts is not ideal, but I see the ingenuity in it.
I think the <nolink> solution is the best one. Will it also not interpret html tags?
Re: enclosing code in comments so mantis doesn't interpret
Depends on how it would be implemented.Kunda wrote:Will it also not interpret html tags?
Don't expect that there will be something implemented. This is nothing more than a proposal from me.
If you want this feature in a future version you have to
- enter a feature request at http://www.manisbt.org/bugs
- wait until someone is interested in implementing it (maybe years) or much better
- fork us on GitHub and send a pull request
I know, that's not the answer you are hoping for