From 7c9bcf82436189e69db28df1b3a7cc8d7dd7b5c4 Mon Sep 17 00:00:00 2001 From: Moshe Zadka Date: Sat, 31 Mar 2001 14:26:54 +0000 Subject: [PATCH] - xmllib.py - Moved clearing of "literal" flag. The flag is set in setliteral which can be called from a start tag handler. When the corresponding end tag is read the flag is cleared. However, it didn't get cleared when the start tag was for an empty element of the type . This modification fixes the problem. --- Lib/xmllib.py | 2 +- Misc/NEWS | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Lib/xmllib.py b/Lib/xmllib.py index b8422cb4508c..89d7a8af7fb9 100644 --- a/Lib/xmllib.py +++ b/Lib/xmllib.py @@ -683,7 +683,6 @@ class XMLParser: if not self.stack or tag != self.stack[-1][0]: self.handle_data(rawdata[i]) return i+1 - self.literal = 0 k = res.end(0) if endbracket.match(rawdata, k) is None: self.syntax_error('garbage in end tag') @@ -699,6 +698,7 @@ class XMLParser: # Internal -- finish processing of end tag def finish_endtag(self, tag): + self.literal = 0 if not tag: self.syntax_error('name-less end tag') found = len(self.stack) - 1 diff --git a/Misc/NEWS b/Misc/NEWS index 15d0e61ce90e..9e4fd9d661b8 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -131,6 +131,14 @@ http://sourceforge.net/tracker/index.php?func=detail&aid=&group_id=5470&atid - #12195 - webbrowser.py - there was typo in Mac code +- quopri.py - treat \r as whitespace too + +- xmllib.py - Moved clearing of "literal" flag. The flag is set in setliteral + which can be called from a start tag handler. When the corresponding end + tag is read the flag is cleared. However, it didn't get cleared when + the start tag was for an empty element of the type . This + modification fixes the problem. + What's New in Python 2.0? ========================= -- 2.47.3