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

API Editor and HTML entity replacement

So I created the script located  here .  This script uses  HTML entity replacement to create drop down queries that actually work. So if I go into the API editor and add my script, I see the following: Notice the circled area, this shows that the HTML entity replacement is intact.  Saving here is fine, exiting is fine, the script works as expected. However, the problem appears when you close the API settings page and attempt to go back into the page again: Notice the circled area again, all of the HTML entity replacements are gone!!  Meaning if script is saved again on this page, none of the fancy macros I made will work. Seems like a defect with the editor?  Is there any workaround to this?
1493665076

Edited 1493665115
Yeah, string concatenation. &" + "#
Sky said: Yeah, string concatenation. Can you give an example?
See edit above.
Sky said: Yeah, string concatenation. &" + "# Ok, got it, thanks that works.  Not terribly user friendly, but the HTML entity replacement in general isn't.
1493669872
The Aaron
Pro
API Scripter
I have a function in almost all my scripts that handles creation of the entities, ch().  This has been an issue for years.  It most often showed up for me when copy/pasting from from a webpage into the editor.