# HG changeset patch # User hodgestar # Date 1359202137 0 # Node ID d81f8ba0e6babcfbbcd205ea11d08ce3772c55ee # Parent 95cb5bf323e5b38b1efdf46d1a80dfcdaa1766b6 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()