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

Weirdest rolltemplate CSS bug I have ever encountered

So, hey. I just wanted to tell you guys about the weirdest CSS bug I have ever encountered while trying to add a roll template. I debugged it for my sheet and just went another route. But I thought you should be aware of it. While working on my latest character sheet, I decided I was not happy with the way the default rolltemplate displayed things, and loaded up Jakob's Better Default Roll Template . And it didn't work. At all. Tested it on a different character sheet and it worked FINE. I tried other templates I have and they ALSO failed. It's like this build just didn't like rolltemplates. Well, after hours of testing and debugging, I finally tracked it down to a single entry in my CSS sheet for the build. But there was nothing wrong with the entry. It was simply a CSS value comparison to show certain things when a particular one of my character sheet "error" messages popped up. Just a string value used as a CSS selector. See below. .sheet-alertcheck[value*="You do not own this item"] ~ .sheet-eqshow{ display:inline-block; } THIS stupid little selector entry was halting my use of rolltemplates, and costing me hours of headache. Crazier still, when I narrowed things further it seemed to be the word "this" that it objected to. The fix? Drumroll please... .sheet-alertcheck[value*="You do not own that item"] ~ .sheet-eqshow{ display:inline-block; } Works great now. So, yeah. That was weird. I have no idea WHY Roll20's rolltemplate functions dislike the word "this," but I will try to steer clear of it in the future.  :P
1662883124

Edited 1662883208
vÍnce
Pro
Sheet Author
<a href="https://wiki.roll20.net/Building_Character_Sheets#Security_Filtering" rel="nofollow">https://wiki.roll20.net/Building_Character_Sheets#Security_Filtering</a> ;-) Been there. Roll20 has some "issues" you just have to workaround.
1662883553
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Michael! I believe that's one of the sanitizer features, disabling "this" for security reasons. From the wiki : Security Filtering Using the word eval anywhere in the sheet code will stop everything from working. Roll20 have put is as a security measure to prevent eval to be used even in a roundabout way. You cant have attribute or class names that includes it. Known list of forbidden words: data:, eval, cookie, window, parent, this, behaviour, behavior, expression, moz-binding this also prevent you from importing fonts that contain eval as part of the name, like "MedievalSharp"
1662884111

Edited 1662884219
Wow! That would have been good to know ahead of time. I'm lousy on research before a project. I just tend to "go for it and see what happens." This list will probably save me more hours of debugging. I should have done more research on their security measures and known issues before proceeding.&nbsp; Thanks Keith! And thanks Vince! Michael keithcurtis said: Hi Michael! I believe that's one of the sanitizer features, disabling "this" for security reasons. From the wiki : Security Filtering Using the word eval anywhere in the sheet code will stop everything from working. Roll20 have put is as a security measure to prevent eval to be used even in a roundabout way. You cant have attribute or class names that includes it. Known list of forbidden words: data:, eval, cookie, window, parent, this, behaviour, behavior, expression, moz-binding this also prevent you from importing fonts that contain eval as part of the name, like "MedievalSharp" vÍnce &nbsp;said: <a href="https://wiki.roll20.net/Building_Character_Sheets#Security_Filtering" rel="nofollow">https://wiki.roll20.net/Building_Character_Sheets#Security_Filtering</a> ;-) Been there. Roll20 has some "issues" you just have to workaround.