# HG changeset patch # User hodgestar # Date 1359201570 0 # Node ID 0d4e1bafad8fcfc8c78fbb5752b1b7831f7f428a # Parent 8d4625183417b20b6f0d04efa516df24ea68bc61 Merge r1213 from trunk (fix infinite loop in interpolation brace matching caused by a change in 2.7). diff --git a/genshi/template/interpolation.py b/genshi/template/interpolation.py --- a/genshi/template/interpolation.py +++ b/genshi/template/interpolation.py @@ -115,7 +115,9 @@ level = 1 while level: match = token_re.match(text, pos) - if match is None: + if match is None or not match.group(): + # if there isn't a match or the match is the empty + # string, we're not going to match up braces ever raise TemplateSyntaxError('invalid syntax', filepath, *textpos[1:]) pos = match.end()