How do I prevent confluence from encoding my '%' character in my url?

Kelv Cutler February 15, 2017

For example, I make a new web link and put the address as:

http://www.google.com/?truth=me%3Dcool

And the link text as:

test

When I save the page, the address turns into:

http://www.google.com/?truth=me%253Dcool

The link text stays the same:

test

This is not acceptable, it ruins the intentional %'s I have in my url.

3 answers

0 votes
Luis Pontes July 20, 2017

I have just experienced the same behavior, when pasting the URL of a JIRA JQL search into a Web Link.

The JIRA Filter Macro is not always desirable, as it will show the filter results, or just print the number of results.

Sometimes, we just want a named hyperlink to some JQL search in Jira. This is only possilbe using the Web Link.

So when pasting the URL of the JIRA JQL search, and then saving the link, all % chars are encoded to %25. So what was "%3D", becomes, "%253D".

.... now for the ridiculous part....

Edit the Web Link, and then save it again, without changing anything.

It keep appending %25 to the URL.

So what was "%253D", becomes "%25253D", "%2525253D", "%2525253D", "%2325253D".... for every save.

Really???

It could be that "Confluence is doing the encoding correctly for you, turning your % into %25" but it is not meeting the user need, and it breaks everything.

The Web Link is blind to this use case.

This is a clear Bug in usability!

 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 20, 2017

No, you're wrong.  And right.

You are wrong because "Confluence is doing the encoding correctly for you, turning your % into %25" is correct.  It has to, or you get garbage.

You are right when you say "Confluence is doing the encoding correctly for you, turning your % into %25 repeatedly".  That is absolutely a bug.

Luis Pontes July 20, 2017

Correct. However, from the usabilty perspective, this is not working. It could be technically correct, but it renders this feature useless.

The JIRA Filter Macro will clean the URL for you, and then show you the JQL.

So, the Web Link dialog could do the same, i.e., decode on paste, then encode on save.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 20, 2017

The usability on the encoding is irrelevant - it doesn't work without encoding, so you need it.  But yes, it's broken when it repeatedly does it.

0 votes
Rob Woodgate
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 15, 2017

Hi Kelv,

If you want to use a specific link and you don't want Confluence to change it in any way, you need to embed it in an HTML macro.

 

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 15, 2017

% is not a character you can use in urls without encoding. 

Have another look at your first url, it actually says ?truth=me=cool, because the % in it indicates that there's an encoded character next, and %3D is "="

Confluence is doing the encoding correctly for you, turning your % into %25

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events