How can I escape a backslash using JIRA markup?

Bogdan_Calmac February 23, 2014

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.

7 answers

3 votes
Mike_Rosoft September 20, 2019

This is a serious bug. If Jira has a WYSIWYG editor, it should be really WYSIWYG, and not just make a half-hearted attempt at it. (It should automatically escape all characters as needed, so that what you type is really what gets shown on the page.)

3 votes
brettveen February 6, 2017

Use the Character Encoding Number: 

\
Camilo Santana February 6, 2017

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}

Gilad Hoch June 18, 2019

actually, the above didn't work for me.  this did:

¯\\_(ツ)\_/¯
Like jurko likes this
3 votes
Camilo Santana February 4, 2017

for the shruggie enthusiasts

¯\\_(ツ)\_/¯

UPDATE:

¯\_(ツ)_/¯

 

It appears you can just type it out now. NO NEED TO REPLY TO THIS THREAD. 

Damian Torres July 6, 2017

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

Like # people like this
mabl September 4, 2019

Shruggers gonna shrug! ¯_(ツ)_/¯

Like # people like this
Becca November 7, 2019

This worked for me:

{code}
¯\_(ツ)_/¯
{code}

mabl April 6, 2020

Still no fix?!

 

¯|(ツ)

Camilo Santana July 2, 2020

¯\_(ツ)_/¯

 

It appears you can just type it out now

1 vote
Henning Tietgens
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 24, 2014

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

{noformat}
foo\*.txt
{noformat}

Bogdan_Calmac February 24, 2014
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
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 24, 2014

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

David Rayna August 11, 2014

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.

0 votes
Petar Andreev May 19, 2020

Any working solution? I have to escape apostrophe (') and failed to find a way so far. I have to write "Won't do" in the conditional execution field.

Petar Andreev July 2, 2020

I have gone for the "Will not do" workaround. 

0 votes
Bogdan_Calmac February 24, 2014

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
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 24, 2014
*foo\bar*

IMO there is no need to escape something...

C_ Faysal
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 24, 2014

{ 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
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 24, 2014

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

Bogdan_Calmac February 24, 2014

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)

Suggest an answer

Log in or Sign up to answer