external url gets sanitized a little too much (ampersands get masked) | World Anvil

Remove these ads. Join the Worldbuilders Guild

external url gets sanitized a little too much (ampersands get masked)

closed
· Other ·
By KainsRache on 01/23/2024
· Assigned to Dimitris

I have a problem with linking to documents on my NextCloud instance. Since I want to provide my players with some PDF material which I can't directly integrate in WorldAnvil, I created links to a share with the URL tag. Unfortunately the link looks like this:   https://link-to-my-cloud.org/s/garbage?path=%2Ffolderdocument%20name.pdf&openfile=12345   The parser replaces the & with &amp and the link becomes invalid. Is there any way to prevent this? I have no way to omit the openfile parameter. I understand that it might be necessary to mask any ampersand in normal text to correctly display it on the site but for links they're vital according to RFC 2396, chapter 3.4 as part of the query part of an URI.   Please exclude the url segment of the url bbcode from masking specific characters as it breaks valid urls.

Steps to Reproduce

1. Create an article 2. Insert an url-bbcode 3. Make it link to an example URL with ampersands in it (e.g. https://link-to-my-cloud.org/s/garbage?path=%2Ffolderdocument%20name.pdf&openfile=12345) 4. Save & view the article 5. Hover over the link 6. Discover that the last part (which should be separated by the & character) becomes "&ampopenfile=12345"

Operating System

Linux

Browser

Brave

History

Dimitris @ 24 Jan, 2024 06:03:15 Assignee

Hello there KainsRache - I am really sorry but we won't be able to change that right now - May I suggest that you use a free url shortner? that will allow you to link to your ampersand url but not having the problem on WA.

Dimitris @ 24 Jan, 2024 06:03:46 Assignee
Assigned Dimitris
KainsRache @ 31 Jan, 2024 11:19:31

Hello Dimitris, thank you for your reply, I really appreciate it! For the moment I stick to internal URLs fpr NextCloud which can only be used by logged in users. That's fine for now because it's a private world. Using a link shortener for dozens or even hundreds of files would be a little troublesome, not to mention privacy issues and ad-overflow. ;) I'd love to see this issue resolved some day in the future but at the moment I found a mitigation.

Dimitris @ 13 Feb, 2024 07:59:13 Assignee

I am putting this under discussion for the team and we will see what we do about it :)

Dimitris @ 13 Feb, 2024 07:59:17 Assignee
set this bug to closed