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 .
×

How to sanitize the options in a user-input request box

Is there a way to make the options within a user-input pop-up not effect the pop-up box itself? for example: origonal code: ?{which one?|Option 1, %{selected|repeating_option-0_$0_spell}| Option 2, %{selected|repeating_option-0_$1_spell}} the problem as I see it is that the pike from "%{selected|repeating_option-0_$0_spell}" is acting as pike within the "?{which one?|A, B| C, D}" pop-up box. it should be noted that the code for %{selected|repeating_option-0_$0_spell} is listed below: &{template:default} {{name=Test Attack}} {{attack=[[1d20]]}} {{damage=[[2d6]]}}
1503493309
The Aaron
Pro
API Scripter
Basically, you need to replace some of the } with html entities to allow it to work correctly. &nbsp;There's some info about it here:&nbsp; <a href="https://wiki.roll20.net/Macros#Troubleshooting" rel="nofollow">https://wiki.roll20.net/Macros#Troubleshooting</a> Hopefully Scott C. or Silvyre stop by and help with this...
1503506121

Edited 1503506233
chris b.
Pro
Sheet Author
API Scripter
also any , or | have to be replaced.&nbsp; secondly, if at least one MUST be picked, i find it easier to put as little as possible in the query. Maybe just the $0 or $1 if you can, then put the %{selected|repeating_option-0_ &nbsp;and _spell at the beginning and end of the query so you only type it once.
1503508602

Edited 1503509049
Thank you guys for the partial work-around, in that all of the sub-macros need to have their "problem characters" substituted out for the HTML codes &{template:default} {{name=Test Attack}} {{attack=[[1d20]]}} {{damage=[[2d6]]}} } -&gt; & # 1 2 5 ; [without spaces] is there a way to do it from outside of those blocks of code though, as that will require the recoding of many blocks for that work around to work. Is there a way to sanatize the arguements of the pop-up box and results from the pop-up box side. or must every called option be changed to allow it to be called from a user input box?
ste p. said: is there a way to do it from outside of those blocks of code though Not with Roll Queries. For handling lists of spells, I highly suggest writing a menu of Command Buttons .
1503511100
The Aaron
Pro
API Scripter
This is all basically a hack that the community has come up with to work around the limitations in the component as originally written. &nbsp;There isn't really an easy way to do it as far as I know. &nbsp;The API, a pro subscriber perk, can do a bunch of the work for you, but short of that there's no silver bullets.
1503531943
Andrew C
Marketplace Creator
Silvyre said: ste p. said: is there a way to do it from outside of those blocks of code though Not with Roll Queries. For handling lists of spells, I highly suggest writing a menu of Command Buttons . That's my method now. If you buy one of the things I sell, that's how the 'Monster Spellcasters' will run.