Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How do I stop URL encoding in JIRA comments/descriptions

There are several JIRA tickets that we have where a person is being instructed to update database fields, where the value of the field is a URL. However, as soon as JIRA sees http, it interprets the rest of the line, until it reaches a whitespace character, as part of the URL - turning it into a link and URL encoding it. This is a problem because, being the literal value of a database field update, it is terminated with a single quote, which in turn is being (wrongly) encoded as '.

Example: update field1 set value='http://some.url.com/some/path/to/file.html'

EDIT: the above example looks fine here, but if I do the same thing in a JIRA comment or ticket description, it will come out looking like update field1 set value='http://some.url.com/some/path/to/file.html'.

4 answers

1 accepted

0 votes
Answer accepted

Ok, so, I actually did end up answering my own question here. The issue I had was that my system was NOT set up to use the wiki style renderer for description or comment fields, but the default text renderer. Justin was on the right track, but just didn't go far enough in his explanation of field renderers. Once I changed the renderer, I can now enclose my SQL statements in {noformat} or {code} tags and I'm happy.

Or how about using the {noformat} macro to wrap your SQL command:

{noformat}
update field1 set value='http://some.url.com/some/path/to/file.html'
{noformat}

The {noformat} is a Wiki-text renderer setup that can be used for Free Text fields, comments and Descriptions.

Dear Neil,

Probably you can try to use the URL macro to limit the URL, for an example:
update field 1 set value = [http://some.url.com/some/path/to/file.html]

I hope that this will help!

Nope, that does not work. Keep in mind this is JIRA, not confluence. This is from a sample ticket in my JIRA system:

If I just put in the update statement as written:

UPDATE `sbdb`.`sb_preferences` SET P_VALUE='https://mservices.meijer.com/OptInOutServiceExt/PreferenceManagementService.svc' WHERE P_LABEL='apiUrl' AND P_NODE='//COM/soundbite/ApiWorkerModule/MEIJER_PREFMGMT';

If I try to enclose the URL portion in square brackets:

UPDATE `sbdb`.`sb_preferences` SET P_VALUE='[https://mservices.meijer.com/OptInOutServiceExt/PreferenceManagementService.svc]' WHERE P_LABEL='apiUrl' AND P_NODE='//COM/soundbite/ApiWorkerModule/MEIJER_PREFMGMT';

Note that while I no longer get the single quote being URL encoded to ', I now have square brackets in my quoted string, which is also incorrect. So I'm still looking for a solution.

Note that I still haven't received an answer to this question. Commenting here for additional attention. I have also opened a support ticket.

Dear Neil,

I am sorry to know that the problem still remains on your end.

Looking at your responses above, I see that you tried to update the field value with the URL directly from the database level. However, I see that the table that you want to update is sb_preferences, which I am afraid is not the default JIRA table.

And also, may I know which field in JIRA that is used to contain the URL?

Note that for JIRA fields (or custom fields) that is using the Wiki Style renderer, supposedly we should be able to use bracket on and off to limit the URL entered in the field. Reference: https://jira.atlassian.com/secure/WikiRendererHelpAction.jspa?section=links

Thanks,
Ahmad

Stop parsing my URLs!! 

When I type https://www.xxxx.com/ I expect to see exactly that; we are often developing platforms so seeing the exact URL "as is" is extremely important. 

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you