summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoshe Zadka <moshez@math.huji.ac.il>2001-03-31 14:26:54 +0000
committerMoshe Zadka <moshez@math.huji.ac.il>2001-03-31 14:26:54 +0000
commitb7d2f70659d7cdb9ce26c4b541f095f645c913d6 (patch)
tree0e4572016d5a39f7267cf5964248ae0d4cf17489
parenta97ac3f309f39271cd90922ed5b8f0724a434d0c (diff)
downloadcpython-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.py2
-rw-r--r--Misc/NEWS8
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
diff --git a/Misc/NEWS b/Misc/NEWS
index 15d0e61ce9..9e4fd9d661 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -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?
=========================