Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

[HELP] Graphic GMNotes changing text

1392174574
Konrad J.
Pro
API Scripter
I'm testing something to see how it works and I wanted to store paths to a image, in the user's art library, within a graphic token's GMNotes. I paste the full path I find and then save it. I then read it in a script and log it. Certain characters get changed. ":" and "?" that I've noticed. I tried just typing ":?" without the quotes in GMNotes and then logged the result. This is what I get.. "%3A%3F" My question is, is that a bug or is it as it should be. It looks right when you view the GMNotes, but to the script it equals the ASCII value of the character. Thanks for any help!
1392180647

Edited 1392180713
Lithl
Pro
Sheet Author
API Scripter
Looks like URI encoding. Possibly relating to linking between journal entries and/or viewing journal entries outside the campaign. If you want to read the values with your API script, try using decodeURIComponent(string) or decodeURI(string) .
1392181334
Konrad J.
Pro
API Scripter
Bingo! Thanks!