Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to prevent JIRA from inserting a backslash before markup tag's opening curly bracket ?

erik.hodge1 May 9, 2019

I have a problem with [Wiki Style Renderer] for the field 'Comment'.  There is improper rendering of things like {code}...{code} and {noformat}...{noformat} and 'HTML' when I add a comment to an issue in a browser on Windows 10, but works fine in the JIRA Android app.  I have verified via Windows browser -> JIRA admin -> Manage Apps that the Wiki Renderer Macros Plugin has 8 of 8 modules enabled.

I can edit the comment in the Android app and only in there do I see that a backslash '\' has been inserted right before the '{' of the "{code}" or other tag.  That backslash escapes the '{' and thus causes the renderer to ignore the tag and instead display it as plain text.  Why is JIRA adding that '\' and how do I get it to stop?

To be clear, if I type "{noformat} *no format* {noformat}" in a comment in the Windows browser (Firefox and Chrome, didn't test others), this is what appears in the comment:

{noformat} *no format* {noformat}

and that is also what appears when I edit it in Windows browser, but \{noformat} *no format* \{noformat}" appears if I edit it in the Android app.  This is what appears when I view that same comment in the Android app:

{noformat} no format {noformat}

If I type "{noformat} *no format* {noformat}" in a comment in the JIRA app, this is what appears in the app, noting that this is the correct, expected behavior:

no format

Please let me know if there is a way to disable the silent and undesired adding of a backslash by atlassian.net JIRA in browsers.  I can't ask my whole team to exclusively use the JIRA app for posting code snippets in comments.

1 answer

1 accepted

1 vote
Answer accepted
Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 13, 2019

Hello Erik,

The double backslash is an escape character to signify the difference of a reserved character formatted as text vs the wiki markup in the formatting.

From the behavior you are describing it sounds like you are using the New Issue View and issues in the new view have a new editor for the text fields with a wysiwyg editing experience in the fields and no longer recognizes the wiki-markup formatting that was previously used. 

In certain locations the fields can still be rendered in wiki markup displaying the fields with the previous formatting where the escape characters displayed with the double slashes when switching back an forth between wiki markup and the new view, the special characters when entered in the new view then displayed by the wiki markup are shown with escape characters.

in the new issue view to add in a code block macro you can either use the "/" character to trigger a macro selector dropdown, and start typing the name of the desired formatting macro like this:

Screen Shot 2019-05-13 at 3.16.41 PM.png

OR you can use the "code snippet" icon formatting option in the text field header here:

Screen Shot 2019-05-13 at 3.23.39 PM.png

Regards,
Earl

erik.hodge1 May 13, 2019

Ah, thanks for edifying me on the New Issue View's different approach to text handling. I can see it's going to be much easier to use than the mark-up method.

Like Earl McCutcheon likes this

Suggest an answer

Log in or Sign up to answer