mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
#7311: fix html.parser to accept non-ASCII attribute values.
This commit is contained in:
parent
9b5ac3efa6
commit
2e3607c1e7
3 changed files with 20 additions and 1 deletions
|
|
@ -28,7 +28,7 @@
|
|||
# make it correctly strict without breaking backward compatibility.
|
||||
attrfind = re.compile(
|
||||
r'\s*([a-zA-Z_][-.:a-zA-Z_0-9]*)(\s*=\s*'
|
||||
r'(\'[^\']*\'|"[^"]*"|[-a-zA-Z0-9./,:;+*%?!&$\(\)_#=~@]*))?')
|
||||
r'(\'[^\']*\'|"[^"]*"|[^\s"\'=<>`]*))?')
|
||||
attrfind_tolerant = re.compile(
|
||||
r'\s*([a-zA-Z_][-.:a-zA-Z_0-9]*)(\s*=\s*'
|
||||
r'(\'[^\']*\'|"[^"]*"|[^>\s]*))?')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue