summaryrefslogtreecommitdiff
path: root/Lib/HTMLParser.py
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2004-06-05 15:31:45 +0000
committerAndrew M. Kuchling <amk@amk.ca>2004-06-05 15:31:45 +0000
commitc33e54d011700966861e51b9682e601ff50bce8f (patch)
tree598e12b94d4deb634fcad7dfe9660ec3cb4dbf6f /Lib/HTMLParser.py
parent8032ba517e57d3e28a0d4c1784dfca00a686424d (diff)
downloadcpython-c33e54d011700966861e51b9682e601ff50bce8f.tar.gz
[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.
Diffstat (limited to 'Lib/HTMLParser.py')
-rw-r--r--Lib/HTMLParser.py2
1 files changed, 1 insertions, 1 deletions
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