How can I escape a backslash using JIRA markup?

How can I write foo\bar using JIRA markup? The backslash is an escape character and the double backslash does not appear to be rendered as a single backslash.

https://jira.atlassian.com/browse/JRA-9258describes a workaround using the HTML escape code \ but I don't consider this to be a resonable solution.

5 answers

for the shruggie enthusiasts

¯\\_(ツ)\_/¯

This is the exact reason I was trying to find out how to escape a backslash without a newline.  :)

Use the Character Encoding Number: 

\

OP stated

{Quote}https://jira.atlassian.com/browse/JRA-9258describes a workaround using the HTML escape code \ but I don't consider this to be a resonable solution{quote}

0 votes
Henning Tietgens Community Champion Feb 24, 2014
*foo\bar*

IMO there is no need to escape something...

{ need to be escaped afaik..otherwise a line break will appear :(

i mean like blablabla{1,2}

this will be saved as

blablabla

{1,2}

blablabla\{1,2\} will show up correctly

Henning Tietgens Community Champion Feb 24, 2014

Yes, but *foo\bar* is working perfectly.

Yes, it works. It seems that I picked the wrong example. Try foo\*.txt. This will not work.

In this case:

  • one backslash escapes the * which is a special character
  • two backslashes mean new line (this is unfortunate)

UPDATE: Initially I picked the wrong example. As pointed out by Henning, foo\bar works fine. foo\*.txt doesn't though.

0 votes
Henning Tietgens Community Champion Feb 24, 2014

If it's a special text (like a directory) you could use

{noformat}
foo\*.txt
{noformat}

That's a whole different formatting. I needed to use this in a normal paragraph, something like "Copy all foo\*.txt files to the bar directory and ..."
Henning Tietgens Community Champion Feb 24, 2014

OK, than I only know the already mentioned method in JRA-9258.

There are many cases where symbols follow \ and the \ cannot be displayed.

I've wasted too much time with this trying to find workarounds that look terrible if they work at all.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,129 views 13 19
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot