diff options
-rw-r--r-- | Lib/sgmllib.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/sgmllib.py b/Lib/sgmllib.py index a471c05..fe91c1b 100644 --- a/Lib/sgmllib.py +++ b/Lib/sgmllib.py @@ -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*') |