# Links produced by the Composer link modal break when they contain a ' (%27)

**URL:** <https://meta.discourse.org/t/links-produced-by-the-composer-link-modal-break-when-they-contain-a-27/376782>\
**Category:** Bug\
**Tags:** composer\
**Created:** [July 31, 2025, 8:55pm UTC](https://meta.discourse.org/t/links-produced-by-the-composer-link-modal-break-when-they-contain-a-27/376782 "2025-07-31T20:55:40Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)\
**Post date:** [July 31, 2025, 8:55pm UTC](https://meta.discourse.org/t/links-produced-by-the-composer-link-modal-break-when-they-contain-a-27/376782/1 "2025-07-31T20:55:40Z")

</div>

This is a bit of a weird little one, but highlights a problem with links in posts which are associated with text.

If I:

1. create a [data explorer](https://meta.discourse.org/t/32566?silent=true) query with a variable
2. and assign it to a group
3. visit the URL via the group’s reports tab
4. add the variable and run the query
5. copy the URL and add it to some text in a post

then the URL is corrupted / broken.

What I observe is:

1. This is an example link thus created (private sorry):  
`https://ehealthforum.nz/g/HiNZ-staff/reports/128?params=%7B%22topic_id%22%3A%2234521%22%7D`
2. When I add this link to [some text here](https://ehealthforum.nz/g/HiNZ-staff/reports/128?params=%257B%2522topic_id%2522%253A%252234521%2522%257D) something goes screwy with the URL encoding and we get this:  
`https://ehealthforum.nz/g/HiNZ-staff/reports/128?params=%257B%2522topic_id%2522%253A%252234521%2522%257D`

And that beautifully breaks the site!

If I simply paste the link in the post, this doesn’t happen - it is only when I add it to text. So something goes funny when it encounters some existing encoding I think.

---

_[View the full topic](https://meta.discourse.org/t/links-produced-by-the-composer-link-modal-break-when-they-contain-a-27/376782)._
