Mercurial > cpython-lru_cache-weakref
diff Lib/HTMLParser.py @ 32256:2f5f38f4bc2b legacy-trunk
[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.
| author | Andrew M. Kuchling <amk@amk.ca> |
|---|---|
| date | Sat, 05 Jun 2004 15:31:45 +0000 |
| parents | 71a294bd7950 |
| children | 06abdcd57fa8 |
line wrap: on
line diff
--- a/Lib/HTMLParser.py Sat Jun 05 14:53:22 2004 +0000 +++ b/Lib/HTMLParser.py Sat Jun 05 15:31:45 2004 +0000 @@ -26,7 +26,7 @@ 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
