Forums

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

Pasting Code Blocks in Jira Comments Removes URLs

Harold Short
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 19, 2021

We have noticed that if we paste a code block into a ticket comment, any URLs in the code block get removed. This can be problematic if we don't notice this has happened, and is annoying to have to manually fix it.

Example code block to reproduce the issue:

/gopath/pkg/mod/cache/vcs/7e5fa1eab4705eb80c9746632736cea906708d060702d529df6241d1c8c2c9f9: exit status 128:

	fatal: unable to access 'https://gopkg.in/check.v1/': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

Steps

  1. Copy the code block above
  2. Paste the code block in a comment on a Jira ticket
  3. Notice that the URL gets stripped out:
  4. ...fatal: unable to access '': server...

This primarily happens to us when pasting code blocks from Slack, but can be reproduced with just Atlassian products.

1 answer

1 accepted

0 votes
Answer accepted
Benjamin
Community Champion
October 19, 2021

Hi @Harold Short ,

 

You may want to file a ticket on this. However, I did find a way around it. 

 

Just use "/" and find code snippet. Copy and paste your block in it and your URL will be left intact.

 

Hope this helps.

 

-Ben

Harold Short
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 20, 2021

Thanks, that works, just not as automatically as I was hoping for!

Suggest an answer

Log in or Sign up to answer