diff options
author | Moshe Zadka <moshez@math.huji.ac.il> | 2001-03-31 14:26:54 +0000 |
---|---|---|
committer | Moshe Zadka <moshez@math.huji.ac.il> | 2001-03-31 14:26:54 +0000 |
commit | b7d2f70659d7cdb9ce26c4b541f095f645c913d6 (patch) | |
tree | 0e4572016d5a39f7267cf5964248ae0d4cf17489 | |
parent | a97ac3f309f39271cd90922ed5b8f0724a434d0c (diff) | |
download | cpython-b7d2f70659d7cdb9ce26c4b541f095f645c913d6.tar.gz |
- 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 <tag .../>. This
modification fixes the problem.
-rw-r--r-- | Lib/xmllib.py | 2 | ||||
-rw-r--r-- | Misc/NEWS | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/Lib/xmllib.py b/Lib/xmllib.py index b8422cb450..89d7a8af7f 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 @@ -131,6 +131,14 @@ http://sourceforge.net/tracker/index.php?func=detail&aid=<id>&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 <tag .../>. This + modification fixes the problem. + What's New in Python 2.0? ========================= |