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

HTML Entity breaking macros

I've been experimenting with some macros lately and have come across what seems to be a bug. My current experiments regard nesting macros which require HTML entity substitution. Today, when testing a non-nested macro I replaced }} with }} in preparation of building the first level of the nest. After making this change, the macro broke. Mind you, this was a completely functional macro beforehand that completely lacked any substitution.   Below is a simple example of the basic example and the output. Here is an example of the alteration and the output To my knowledge this should not be occurring. Has anyone else encountered this issue or is there something I'm overlooking?
1637653243

Edited 1637653402
Oosh
Sheet Author
API Scripter
That's expected behaviour - the whole reason for using the escaped entities is to stop Roll20's chat parser from recognising them as control characters. As such, your {{damage1 property is effectively unclosed and not picked up by the template assembler as a valid template property. The reason it works once it's nested, is that each iteration through the nesting, the parser does one level of unescaping. So by the time it gets to your "}}" it's actually been unescaped into the "}}" that will be recognised by the template parsing functions. This is yet another reason why many people avoid nesting macros - the nested version won't work as a standalone macro. Or, to summarise in Keith's words: Chat Menu :)