From: Moshe Zadka Date: Sat, 31 Mar 2001 14:26:54 +0000 (+0000) Subject: - xmllib.py - Moved clearing of "literal" flag. The flag is set in setliteral X-Git-Tag: v2.0.1c1~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c9bcf82436189e69db28df1b3a7cc8d7dd7b5c4;p=thirdparty%2FPython%2Fcpython.git - 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. --- 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? =========================