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}

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 ..."

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.

*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

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.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Feb 13, 2019 in Jira

Make your Atlassian Cloud products more secure: our NEW admin security guide

Hey admins! I’m Dave, Principal Product Manager here at Atlassian working on our cloud platform and security products. Cloud security is a moving target. As you adopt more products, employees consta...

619 views 0 12
Read article

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