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] Unicode characters that pass One-Click parsing

1647422444

Edited 1647422570
Richard @ Damery
Pro
API Scripter
The RoundMaster API used to use three Unicode characters ▲ ▼ and ∞, but the One-Click install blocks these as illegal characters.  I've replaced ▲ with ^ and ▼ with v bit this is not ideal as they are not very visible, and I've not thought of a reasonable replacement for ∞.  I've tried using \u#### and string.fromCharCode() but neither of those get past the gatekeepers, either. If I have these characters in the code and load it into the sandbox manually, they work fine.  It is definitely the One-Click install that is stripping them out (Why?  What problem will they cause?). Can anyone give me any hints for replacing these?  Are there alternative equivalent characters that will get past the One-Click install unscathed?  Is there some Roll20 or JS library function I'm missing?  I will admit to not being a brilliant or experienced coder in JS. Suggestions very welcome.
1647435965
timmaugh
Pro
API Scripter
Hey, Richard... yeah, for some reason the one-click doesn't like certain unicode characters. It's especially difficult because you don't realize those characters will be stripped until you've gone through the trouble of waiting for the merge to happen, then you have to go and try it again next week. I pushed up a script just to help with this sort of thing... it's called UnSanity, and it's in the one-click. Basically, you can check the characters in 4 places... in the code itself (if you import from the one-click instead of installing) in the script log panel in the chat interface in a handout Here is the original thread with usage ideas.
1647454604
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
You could use the pictos font , particularly { , } , and then probably r for the infinity symbol.
timmaugh said: Hey, Richard... yeah, for some reason the one-click doesn't like certain unicode characters. It's especially difficult because you don't realize those characters will be stripped until you've gone through the trouble of waiting for the merge to happen, then you have to go and try it again next week. I pushed up a script just to help with this sort of thing... it's called UnSanity, and it's in the one-click. Basically, you can check the characters in 4 places... in the code itself (if you import from the one-click instead of installing) in the script log panel in the chat interface in a handout Here is the original thread with usage ideas. #timmaugh that's wonderful!  A lot of characters to search through - it makes me think I might create some cyphers for the players to decode in-game! Scott C. said: You could use the pictos font , particularly { , } , and then probably r for the infinity symbol. #Scott excellent!  Thanks for the pointer.