From 84175bacd194b3934962d596670a37a8aacd0dcc Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 6 Oct 1995 15:30:57 +0000 Subject: strip attribute values --- Lib/htmllib.py | 1 + 1 file changed, 1 insertion(+) 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': -- cgit v0.12