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 .
×
Advertisement Create a free account

HTML-encoding not working for some characters in roll query drop-down prompts

1564007538

Edited 1564007631
Stephen L.
Pro
Marketplace Creator
Sheet Author
API Scripter
While messing around with drop-down prompts for some of the roll buttons in my scripts, I've discovered that there may be an issue with some escaped special characters. Strings containing these characters, even in HTML-encoded form, don't seem to be getting rendered correctly in the prompt. E.g.  Consider a prompt with the problematic option string:  019- Earthbound - (Otherworldly Foe)!@#$%^&*()_+-=[]{}<>/,.'"\ Not HTML-encoded roll button The unencoded option will obviously cause the prompt to break. [Sound](!ItsATrap_trapCreationWizard_modifyTrapCore sound&&?{Sound A sound from your jukebox that will play when the trap is activated. |none|019- Earthbound - (Otherworldly Foe)!@#$%^&*()_+-=[]{}<>/,.'"\|acidBlast|spooky noise}) HTML-encoded roll button The problematic characters are encoded in the form "&#charcode;". This renders most characters correctly, but breaks when it gets to the encoded '}' character (}). Because it can't handle the HTML-encoded '}', this appears to be a bug in the macro parser. [Sound](!ItsATrap_trapCreationWizard_modifyTrapCore sound&&?{Sound A sound from your jukebox that will play when the trap is activated. |none|019- Earthbound - (Otherworldly Foe)!@#$%^&*()_+-=[]{}<>/,.'"\|acidBlast|spooky noise}) Semi-HTML-encoded roll button (workaround) Here, special characters are encoded into the form "#charcode;". This doesn't break the prompt and allows the special characters to be decoded, but it looks ugly in the prompt since it can only show the encoded version of the special characters. [Sound](!ItsATrap_trapCreationWizard_modifyTrapCore sound&&?{Sound A sound from your jukebox that will play when the trap is activated. |none|019- Earthbound - #40;Otherworldly Foe#41;#33;#64;#35;#36;#37;#94;#38;#42;#40;#41;_#43;-#61;#91;#93;#123;#125;#60;#62;#47;#44;#46;#39;#34;#92;|acidBlast|spooky noise})
1564522651
Drespar
Roll20 Team
Hi Stephen, 1st off, sorry for the delay! I am Passing this along to the development team for investigation. I know there were portions in the past that had some encoding errors following the infrastructure update, so this may be related to that.