mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Allow underscores in tag names and quote characters in unquoted attribute
values. The change for attribute values matches the way Mozilla and Navigator view the world, at least. This closes SF bug #436621.
This commit is contained in:
parent
25211f5724
commit
dc19163b18
1 changed files with 2 additions and 2 deletions
|
@ -34,10 +34,10 @@ endbracket = re.compile('[<>]')
|
|||
special = re.compile('<![^<>]*>')
|
||||
commentopen = re.compile('<!--')
|
||||
commentclose = re.compile(r'--\s*>')
|
||||
tagfind = re.compile('[a-zA-Z][-.a-zA-Z0-9]*')
|
||||
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./:;+*%?!&$\(\)_#=~\'"]*))?')
|
||||
|
||||
decldata = re.compile(r'[^>\'\"]+')
|
||||
declstringlit = re.compile(r'(\'[^\']*\'|"[^"]*")\s*')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue