Mercurial > cpython-lru_cache-weakref
diff Lib/HTMLParser.py @ 69160:7d4dea76c476 2.7
#7311: fix HTMLParser to accept non-ASCII attribute values.
| author | Ezio Melotti |
|---|---|
| date | Tue, 05 Apr 2011 20:40:52 +0300 |
| parents | 05cccd4257a2 |
| children | 02a4535c0a6c |
line wrap: on
line diff
--- a/Lib/HTMLParser.py Tue Apr 05 15:24:34 2011 +0200 +++ b/Lib/HTMLParser.py Tue Apr 05 20:40:52 2011 +0300 @@ -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'(\'[^\']*\'|"[^"]*"|[^\s"\'=<>`]*))?') locatestarttagend = re.compile(r""" <[a-zA-Z][-.a-zA-Z0-9:_]* # tag name
