Closed ggmichaelgo closed 11 months ago
https://github.com/Shopify/liquid/pull/1755 introduced a bug to comment tag parsing.
comment
The comment tag uses this regex to match the tag delimiter:
/\A(.*)(?-mix:\{\%)-?\s*(endcomment)\s*(.*)?-?(?-mix:\%\})\z/m
After matching the endcomment, the regex is also matching the extra string with \s*(.*)? Since it doesn't require a whitespace after matching with the tag delimiter, it allows delimiters like {% endcommentABC %} to be matched.
endcomment
\s*(.*)?
{% endcommentABC %}
What are you trying to solve?
https://github.com/Shopify/liquid/pull/1755 introduced a bug to
comment
tag parsing.The
comment
tag uses this regex to match the tag delimiter:After matching the
endcomment
, the regex is also matching the extra string with\s*(.*)?
Since it doesn't require a whitespace after matching with the tag delimiter, it allows delimiters like{% endcommentABC %}
to be matched.