From 3cf8f7de30cb234c331847be2d2b93c022fdab64 Mon Sep 17 00:00:00 2001 From: gmcm Date: Tue, 20 Aug 2002 14:24:19 +0000 Subject: [PATCH] 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 --- roundup/template_parser.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) 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'): -- 2.30.2