Bug: Links with square brackets get replaced by empty (anchor # hashtag) links
Asked by Leo Tulipan:

We have a reproduceable problem

We are using a cloud accounting app, that generates deep links with long parameter lists wich aren't properly saved. There is a work-around but it is error-prone. I added the Example, which is long too the end of this post (but you cannot access it, due to login restrictions). This link it uses the square bracket special chars \[ \] in its params

1) Edit a confluence page  
2) mark a text  
3) insert link  
4) paste the long link  
5) look at the link: it seems to be ok  
6) save the page  
7) BUG: on save the link got replaced by # (an empty anchor link)

Workaround

instead of 2-4:  
2) paste the link and press ENTER  
3) Link got turned into a clickable link, hover and choose edit  
4) click on the text/description which is currently the same as the url and manually write the text you want to have shown  
-\> continue as above

This is not proper behaviour. I don't know why it doesn't work in the link edit popup to save such a link, but it works when your system turns it into a link on enter?

Regards  
Leo

Non-working (login/auth will be missing) Example:

[https://domonda.app/documents?clientCompanyRowId=6fdb9223-db0e-6f8b-afeb-e82cab958085\&clientCompanyTagRowIds\[\]=0a6a87a5-688f-4d3b-454b-d626a3212d2c\&clientCompanyTagRowIds\[\]=804d9e06-79c1-4b53-9849-e184375cc1d7\&clientCompanyTagRowIds\[\]=13600316-1bc4-4d61-aa0e-fe49a8801230\&clientCompanyTagRowIds\[\]=8fd8aa3e-9689-4ac4-a424-8f6a64d4f47a\&clientCompanyTagRowIds\[\]=e62f646b-640e-4d54-4590-033a1a83102b\&clientCompanyTagRowIds\[\]=0a3b1eca-aa71-4e9d-abb2-51ade20b128b\&clientCompanyTagRowIds\[\]=06ef088a-c59a-46d...](https://domonda.app/documents?clientCompanyRowId=6fdb9223-db0e-6f8b-afeb-e82cab958085&clientCompanyTagRowIds[]=0a6a87a5-688f-4d3b-454b-d626a3212d2c&clientCompanyTagRowIds[]=804d9e06-79c1-4b53-9849-e184375cc1d7&clientCompanyTagRowIds[]=13600316-1bc4-4d61-aa0e-fe49a8801230&clientCompanyTagRowIds[]=8fd8aa3e-9689-4ac4-a424-8f6a64d4f47a&clientCompanyTagRowIds[]=e62f646b-640e-4d54-4590-033a1a83102b&clientCompanyTagRowIds[]=0a3b1eca-aa71-4e9d-abb2-51ade20b128b&clientCompanyTagRowIds[]=06ef088a-c59a-46d5-8d21-042e21148571&clientCompanyTagRowIds[]=227801a2-3010-4850-8b8c-402e605f5be4&clientCompanyTagRowIds[]=890368a3-5640-48e8-8314-5df3f47db7f8&clientCompanyTagRowIds[]=b8662073-4e88-4fa4-9cfc-f97ee43ed9d8&clientCompanyTagRowIds[]=733bbb41-ac1e-46f8-90dc-8af38cc46806&clientCompanyTagRowIds[]=016700b9-4182-458c-9b77-9e9147ba550b&clientCompanyTagRowIds[]=7e39349c-1480-4f89-9669-402e26cc1b3d&clientCompanyTagRowIds[]=cfe51dfd-40cd-4f71-4fa4-3d5780501b1c&clientCompanyTagRowIds[]=96cb2c9c-d47e-48be-44fc-451d35e95e31&clientCompanyTagRowIds[]=4a4d631d-9046-479c-8288-10c515962270&clientCompanyTagRowIds[]=a9734365-2bbc-48f7-9f2d-475fe949e3d7&clientCompanyTagRowIds[]=e38ae622-c781-6fd6-ad80-9183a0a7d108&clientCompanyTagRowIds[]=a8a48dea-7aed-4745-af24-7d9aafacce98&clientCompanyTagRowIds[]=a0a5971d-6899-46d7-a2f4-7e8aa4d86c98&clientCompanyTagRowIds[]=206428b2-62b2-4f80-8a7e-515d75e8a31e&clientCompanyTagRowIds[]=fd33264b-8f0f-4d0c-4e70-24e933083a3b&clientCompanyTagRowIds[]=db01bd63-d353-4610-4a2c-e189c1a53568&clientCompanyTagRowIds[]=b57d75f3-a7ac-4982-812c-64bb81b070e9&clientCompanyTagRowIds[]=ae1adb69-a410-438e-4e83-7229d4f03d7d&clientCompanyTagRowIds[]=dbffc16d-e735-4fdf-807d-cbbb0448361c&clientCompanyTagRowIds[]=ec8f98a3-fcbc-44e1-47fe-cd0e3af067f7&clientCompanyTagRowIds[]=19446f20-8715-400b-4907-29f97a9aa1da&count=30&dateFilterType=DOCUMENT_DATE&documentCategoryRowIds[]=726c8123-f77d-4623-9637-2dc494f589d9&excludeClientCompanyTagRowIds=true&fromDate=2021-01-01T00%3A00%3A00.000Z&orderBy=INVOICE_DATE&orderByDirection=DESC&partnerCompanyRowIds[]=8a66868d-7a9e-4b96-4266-38f038d5893e&superseded=false&view=THUMB_VIEW)


Answers:
author: Shannon S
body: Hello Leo,

Thank you for raising this question with the Atlassian Community! There's a known bug that causes square brackets to convert to the hash aka pound symbol:

* [CONFCLOUD-72438](https://jira.atlassian.com/browse/CONFCLOUD-72438) *Confluence pages with links containing "\[\]" will turn into "#" after being published*

The current workaround is to update the URL to use raw ASCII for the square brackets. You can use the below ASCII.  

```
[ = %5b] = %5d
```

Essentially, you would replace the \[\] characters with the ASCII above. Please give that a try and let us know if it helps.

Take care,

Shannon \| Atlassian Community Support

comments: author: Pramodh M
body: Thanks [@Shannon S](/t5/user/viewprofilepage/user-id/510046)


author: Eligh Corchis-Scott
body: I'm having the same issue with round brackets.


author: Pramodh M
body: Hi [@Leo Tulipan](/t5/user/viewprofilepage/user-id/4124812)

Hmm, Strange!!

Maybe while saving there is a limit to the number of characters for the link to store it.

I would check with Atlassian on this and get back to you

Thanks


Tags: cloud

confluence-cloud