summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-10-06 15:30:57 (GMT)
committerGuido van Rossum <guido@python.org>1995-10-06 15:30:57 (GMT)
commit84175bacd194b3934962d596670a37a8aacd0dcc (patch)
tree3a336789775d08a0bc2d7bd8ed1286f48f9a8d43
parent650ba37e1d7f1f3cf3f25d12965b2d1d68eacf4f (diff)
downloadcpython-84175bacd194b3934962d596670a37a8aacd0dcc.zip
cpython-84175bacd194b3934962d596670a37a8aacd0dcc.tar.gz
cpython-84175bacd194b3934962d596670a37a8aacd0dcc.tar.bz2
strip <A> attribute values
-rw-r--r--Lib/htmllib.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/htmllib.py b/Lib/htmllib.py
index c5c6f09..b689f9c 100644
--- a/Lib/htmllib.py
+++ b/Lib/htmllib.py
@@ -322,6 +322,7 @@ class HTMLParser(SGMLParser):
name = ''
type = ''
for attrname, value in attrs:
+ value = string.strip(value)
if attrname == 'href':
href = value
if attrname == 'name':