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

Second smaller than sign (<) abruptly ends an inline roll's result text

1625457528

Edited 1625458395
What I mean by this, is if I have the following inline roll: [[1d6ro&lt;2 + 1d6ro&lt;2]] Hovering over the result will show something like this: As you can see, the inline roll still works as intended, and testing does show that placing anything after the second &lt; does get processed correctly, the issue is that it just will be missing from the roll result. This is an issue because I wish to keep things above board as much as possible, labelling which rolls are which types. This oddity is in contrast with the greater than sign (&gt;), which can be placed as many times as I want without affecting the roll result: [[1d6ro&gt;2 + 1d6ro&gt;2 + 1d6ro&gt;2 + 1d6ro&gt;2]] I've tried replacing &lt; by its html code equivalent, however in that case the inline roll doesn't process correctly. The issue is not exclusive to the "reroll once" parameter. I couldn't find any posts talking about this issue.
1625470564

Edited 1625471179
Oosh
Sheet Author
API Scripter
It looks like the dice parser is overachieving a little with trying to sanitise &lt; html &gt; tags. It doesn't seem to like any unmatched &lt; opening tags in there, which unfortunately is also the "less than" operator. As far as I can tell, there's no other way to tell the parser to do a "less than" operation. As you've noticed, the roll itself works fine. It's just the function turning the inline roll expression into a tooltip that seems to be an issue. Anyway, one way to get around it is to close the imaginary HTML tag, then use some HTML substitution to replace the stripped-out content. To use your initial roll: [[1d6ro&lt;2 + 1d6ro&lt;2 &gt;&amp;lt;2]] The garbage on the end is ignored by the math functions of the roll parser, but still sneaks into the tooltip. The inital "&gt;" "closes out the not-really-an-HTML-tag-HTML-tag", and the parser stops stripping the content out at that point. The &amp;lt; then sneaks into the tooltip as a "&lt;". And the 2 is a 2, but without an operator before it, shouldn't affect the total. There might be another sneaky way around this, but it's likely it needs a fix from Roll20. It should be able to pass valid math functions through to tooltip HTML without worrying about malicious code - or just provide a secondary character for greater than/less than operations and completely sidestep the HTML issue.
1625471225

Edited 1625471869
Oosh said: It looks like the dice parser is overachieving a little with trying to sanitise &lt; html &gt; tags. It doesn't seem to like any unmatched &lt; opening tags in there, which unfortunately is also the "less than" operator. As far as I can tell, there's no other way to tell the parser to do a "less than" operation. As you've noticed, the roll itself works fine. It's just the function turning the inline roll expression into a tooltip that seems to be an issue. Anyway, one way to get around it is to close the imaginary HTML tag, then use some HTML substitution to replace the stripped-out content. To use your initial roll: [[1d6ro&lt;2 + 1d6ro&lt;2 &gt;&amp;lt;2]] The garbage on the end is ignored by the math functions of the roll parser, but still sneaks into the tooltip. The inital "&gt;" "closes out the not-really-an-HTML-tag-HTML-tag", and the parser stops stripping the content out at that point. The &amp;lt; then sneaks into the tooltip as a "&lt;". And the 2 is a 2, but without an operator before it, shouldn't affect the total. Oh my lord I'm so glad I took the chance of posting here instead of wasting more time on this trying to fix it on my own. This works! Thank you so much man! You rock! Something I notice however is that this would need to be placed at the end of the roll, otherwise everything after it is ignored in the calculation, even if present in the tooltip. Either that, or repeat everything after the very first &lt; so that it goes into the calculation. At least, that's what I had to do. Example: {{dmg1=[[2d6ro&lt;2[Slashing] + 1d6ro&lt;2[Fire] + @{charisma_mod}[CHA] + @{global_damage_mod_roll} &gt;&amp;lt;2[Fire] + @{charisma_mod}[CHA] + @{global_damage_mod_roll}]]}} Result: