From: gmcm Date: Tue, 20 Aug 2002 14:24:19 +0000 (+0000) Subject: Fix so it can do inside an attribute of another tag. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3cf8f7de30cb234c331847be2d2b93c022fdab64;p=roundup.git Fix so it can do inside an attribute of another tag. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@979 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/roundup/template_parser.py b/roundup/template_parser.py index ea4a5a4..e3e8ec4 100644 --- a/roundup/template_parser.py +++ b/roundup/template_parser.py @@ -70,12 +70,17 @@ class RoundupTemplate(htmllib.HTMLParser): 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'):