URL encoding in description/comment field

Hi,

I want to paste some code(incl url/links) with highlighting ({code}) into description field, so an other colleague can simply copy / paste the code to work with it.

The problem here is, that jira always adds a <a href.. in front of the URL, so the person who copys the code will always get compile errors.

So

What I do is:

{code}
some useful php code and https://www.atlassian.com/<br< a="">>{code}

What I expect to see in the description field/comment field:

some useful php code and https://www.atlassian.com/

What I actually get is:

some useful php code and <a href="https://www.atlassian.com/">https://www.atlassian.com/</a>

Ths is really annoying..I want a code block, I want that syntax highlighting but I do not want to have this <a href piece...


Thats should not be rocket science..?

3 answers

1 accepted

This widget could not be displayed.

I have strong feeling that jeditor replaces that link...

Deactivated jEditor plugin and now it works...

Right feeling... Thanks a lot!

No problem) You can mark the question as answered to close it.

This widget could not be displayed.

Please try {noformat} test linking http://www.atlassian.com{noformat}

Hi, I've just checked on my local jira:

{code:xml}

<test>

<another tag="http://www.atlassian.com"/>

</test>

{code}

and that worked fine. could you please give the example that fails?

Hi Alexey,

when we use {noformat}, we dont have any code highlighting within this section, which is important for us to show that this is a code block and not plain text

Your example does not work for me. Wenn I copy your example and paste it as a comment, it looks like this:

<test>
<another tag="<a href="http://www.atlassian.com">http://www.atlassian.com</a>"/>
</test>
I dont want that

I am using the Wiki Renderer and thats why it pastes this <a href ... code block.

As soon as I set the Default Renderer, it works. But then you cannot use any of the code formatting tools which atlassian provides (bold, table, background color, etc.)...

seems you use default text renderer for your comments,

could you please try to open the field configuration (from here /secure/admin/ViewFieldLayouts.jspa) , open configuration to edit, find the comment field, and follow Renderers link, select Wiki renderer and try again.

What version of jira do you use?

- I've tried on 6.1.7 with provided option - and that worked fine. The same for description. Could you please share the rendered comment / description image? and also the screenshot of it in edit mode?

The Comment rendered

1. Please add a screenshot with the list of listeners on your system (Administration - system - listeners)

2. Please show the list of renderers for the comment field inside configuration (with screenshot)

Cant find the first thing you mentioned with the list of listeners, but this may help:

/secure/admin/ViewListeners!default.jspa - there is the list of listeners. That screenshot didn't help.

could you please try to disable jeditor plugin for a moment, check the comment creation and enable it back?

This widget could not be displayed.

JIRA v6.1.7

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

147 views 1 3
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