Log in

View Full Version : Unable to create a linked URL that includes a special character



cwsoots
June 25th, 2021, 18:36
When attempting to create a story link for a URL that includes a special character (in this case an !), the link is created but truncates the URL to just before where the special character is. For example, if I try to create a link for this URL: https://1drv.ms/b/s!Aocvbx1XzPmhifEr0B6QWESg1qdnOg, FGU chat responds with "(LINK)!Aocvbx1XzPmhifEr0B6QWESg1qdnOg". It creates a non-functional link for this portion only "https://1drv.ms/b/s", which doesn't work.

I have previously used OneDrive links in FGC, and they worked fine.

Zacchaeus
June 25th, 2021, 18:43
Classic was much more forgiving when it came to file names and xml structure. Unity not so much.

cwsoots
June 25th, 2021, 18:54
Ugh. I was hoping there was a better answer. I'm adding my vote to an existing, related idea at https://fgapp.idea.informer.com/.

Trenloe
June 25th, 2021, 19:04
Escape the ! with %21

https://1drv.ms/b/s%21Aocvbx1XzPmhifEr0B6QWESg1qdnOg

You don't need to escape everything, just the character/s that FG doesn't recognize/blocks. See the "ASCII Encoding Reference" section here: https://www.w3schools.com/tags/ref_urlencode.ASP Don't use any of the URL encoding functions on there - it does too much. Just use that reference to replace any characters that FG doesn't recognize with the %xx code.

mattekure
June 25th, 2021, 19:08
When attempting to create a story link for a URL that includes a special character (in this case an !), the link is created but truncates the URL to just before where the special character is. For example, if I try to create a link for this URL: https://1drv.ms/b/s!Aocvbx1XzPmhifEr0B6QWESg1qdnOg, FGU chat responds with "(LINK)!Aocvbx1XzPmhifEr0B6QWESg1qdnOg". It creates a non-functional link for this portion only "https://1drv.ms/b/s", which doesn't work.

I have previously used OneDrive links in FGC, and they worked fine.

You can try using this extension. Works fine creating the link with it.

https://www.fantasygrounds.com/forums/showthread.php?57527-MK-Linker&p=506174#post506174

cwsoots
June 25th, 2021, 19:10
Brilliant! That worked perfectly. Thanks, Trenloe! This would be a useful addition to the wiki (if it isn't there already).

LordEntrails
June 25th, 2021, 20:42
Or use something like tinyurl to get a new url for the link.