Roll queries and roll template elements


Edited 1507127131
So I have been trying to rebuild some roll queries for the 5e OGL 2.0 sheet and I can't seem to get past one problem that I don't remember having in the past involving "{{" at the start of the roll query. This is a very simplified example to try to illustrate the problem, but if I start with a query: ?{Save|Str, 1 |Dex, 2} This works as expected: However if I change "1" to "{{1}}" it completely breaks the query: ?{Save|Str, {{1}} |Dex, 2} Output:
Is there a way to fix this problem?  I don't remember having this problem prior to the recent updates (simply based on looking at my previously working macros).
The Aaron
API Scripter
Do you have an example of a previously working macro that has {{ }} inside the query?  Can you move it to outside the query and get the result you want? {{ ?{Save|Str, 1 |Dex, 2} }}
Isn't this due to the problem of roll queries ending on the first } it picks up? You can avoid this by replacing each } inside the query with it's HTML equivalent. You can read more about that  here .
Sheet Author
API Scripter
Generally it is a  nesting issue : ?{Save|Str, {{1}} |Dex, 2} Would work.
I think I figured it out... global_save_mod was the problem.  This value of this attribute is {{global=X}} (including the {{ }}) where X equals the value of the global saves.   So as Aaron pointed out this value would need to be added outside the query, or it won't work.  Is there a way to avoid the html replacement on the forums so that I can post a working macro (that includes the html replacements so people could copy and paste it)?
You need to HTML encode the HTML encoded values. So } would become }. Specifically, you just need to add amp; betweeen & and #. Note that you can nest this by doing amp;amp;, sometimes when copying from a text editor into the forums here the encoded values are removed.