liquid icon indicating copy to clipboard operation
liquid copied to clipboard

Fix double-adding tokens in raw tags

Open LiptonB opened this issue 8 years ago • 0 comments

The current logic for adding tokens in the raw tag has the potential to add to the body a substring of a token, and then the full token, resulting in doubled data. This happens when the token matches the FullTokenPossiblyInvalid regex, but does not contain the expected end tag. For example, this occurs when a template contains a string like "{% raw %}{{ {% test %} }}{% endraw %}", in which case the tokenizer produces "{{ {% test %}" as one of the tokens, and the template output is "{{ {{ {% test %} }}"

LiptonB avatar Jul 15 '16 18:07 LiptonB