mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
[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.
This commit is contained in:
parent
9021c95595
commit
b7d8ce0275
2 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue