commit 2b1b5394ffa28d2e96f9b0505fbb8b774371ff39
Author: Radek Pazdera <rpazdera(a)redhat.com>
Date: Thu Jul 19 22:26:08 2012 +0200
XmlTemplates: Wrong alias regexp
The regexp for matching aliases was malformed. This error was
causing greedy-match problem with multiple alias references
in one string.
Reported-by: Jan Tluka <jtluka(a)redhat.com>
Signed-off-by: Radek Pazdera <rpazdera(a)redhat.com>
Common/XmlTemplates.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/Common/XmlTemplates.py b/Common/XmlTemplates.py
index 92ff269..a88ccca 100644
--- a/Common/XmlTemplates.py
+++ b/Common/XmlTemplates.py
@@ -29,7 +29,7 @@ class XmlTemplateError(Exception):
class XmlTemplates:
""" This class serves as template processor """
- _alias_re = "\{\$([a-zA-Z0-9_]+)(\[.+\])*\}"
+ _alias_re = "\{\$([a-zA-Z0-9_]+)(\[[^{}]+\])?\}"
_func_re = "\{([a-zA-Z0-9_]+)\(([^\(\)]*)\)\}"
def __init__(self, definitions=None):