From b7d8ce0275d7b4c9a9c2312d0add835c6eac1730 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Sat, 5 Jun 2004 15:31:45 +0000 Subject: [Bug #921657] Allow '@' in unquoted HTML attributes. Not strictly legal according to the HTML REC, but HTMLParser is already a pretty loose parser. Reported by Bernd Zimmermann. --- Lib/HTMLParser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/HTMLParser.py') diff --git a/Lib/HTMLParser.py b/Lib/HTMLParser.py index 733458126b..553e8427cc 100644 --- a/Lib/HTMLParser.py +++ b/Lib/HTMLParser.py @@ -26,7 +26,7 @@ commentclose = re.compile(r'--\s*>') tagfind = re.compile('[a-zA-Z][-.a-zA-Z0-9:_]*') attrfind = re.compile( r'\s*([a-zA-Z_][-.:a-zA-Z_0-9]*)(\s*=\s*' - r'(\'[^\']*\'|"[^"]*"|[-a-zA-Z0-9./,:;+*%?!&$\(\)_#=~]*))?') + r'(\'[^\']*\'|"[^"]*"|[-a-zA-Z0-9./,:;+*%?!&$\(\)_#=~@]*))?') locatestarttagend = re.compile(r""" <[a-zA-Z][-.a-zA-Z0-9:_]* # tag name -- cgit v1.2.1