sqlalchemy / mako

Mako Templates for Python
https://www.makotemplates.org
MIT License
353 stars 60 forks source link

quoted sections in tag not grouped correctly #366

Closed zzzeek closed 2 years ago

zzzeek commented 2 years ago

this will crash the Lexer due to the regex:

from mako.lexer import Lexer
template = "<%0" + '"' * 3000
Lexer(template).parse
sqla-tester commented 2 years ago

Mike Bayer has proposed a fix for this issue in the main branch:

fix tag regexp to match quoted groups correctly https://gerrit.sqlalchemy.org/c/sqlalchemy/mako/+/4053