Mercurial > genshi > mirror
changeset 992:d81f8ba0e6ba stable-0.7.x
Merge r1213 from trunk (fix infinite loop in interpolation brace matching caused by a change in 2.7).
author | hodgestar |
---|---|
date | Sat, 26 Jan 2013 12:08:57 +0000 |
parents | 95cb5bf323e5 |
children | 8e3a5fd43370 |
files | genshi/template/interpolation.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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()