Mercurial > p > roundup > code
diff roundup/template_parser.py @ 962:540fc5fb20d4
Fix so it can do <display...> inside an attribute of another tag.
| author | Gordon B. McMillan <gmcm@users.sourceforge.net> |
|---|---|
| date | Tue, 20 Aug 2002 14:24:19 +0000 |
| parents | fdcf16b444a9 |
| children |
line wrap: on
line diff
--- a/roundup/template_parser.py Tue Aug 20 08:12:45 2002 +0000 +++ b/roundup/template_parser.py Tue Aug 20 14:24:19 2002 +0000 @@ -70,12 +70,17 @@ self.current.append(data) def unknown_starttag(self, tag, attributes): - s = '' - s = s + '<%s' % tag + self.append_data('<%s' % tag) + closeit = 1 for name, value in attributes: - s = s + ' %s="%s"' % (name, value) - s = s + '>' - self.append_data(s) + pos = value.find('<') + if pos > -1: + self.append_data(' %s="%s' % (name, value[:pos])) + closeit = 0 + else: + self.append_data(' %s="%s"' % (name, value)) + if closeit: + self.append_data('>') def handle_starttag(self, tag, method, attributes): if tag in ('require', 'else', 'display', 'property'):
