diff options
author | Guido van Rossum <guido@python.org> | 1995-09-30 16:49:36 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1995-09-30 16:49:36 (GMT) |
commit | e3d9320fc570cb3a02240f41963e05a2b8d9f51a (patch) | |
tree | 96b0704d1c366ca278496579c44e467328c2e31c /Lib | |
parent | 4f399fb6429d7f84de1f881f1fc3968619d9af2e (diff) | |
download | cpython-e3d9320fc570cb3a02240f41963e05a2b8d9f51a.zip cpython-e3d9320fc570cb3a02240f41963e05a2b8d9f51a.tar.gz cpython-e3d9320fc570cb3a02240f41963e05a2b8d9f51a.tar.bz2 |
allow _ in attr names (Netscape!)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/sgmllib.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/sgmllib.py b/Lib/sgmllib.py index fc023eb..2b65686 100644 --- a/Lib/sgmllib.py +++ b/Lib/sgmllib.py @@ -176,7 +176,7 @@ class SGMLParser: attrs = [] tagfind = regex.compile('[a-zA-Z][a-zA-Z0-9]*') attrfind = regex.compile( - '[ \t\n]+\([a-zA-Z][a-zA-Z0-9]*\)' + + '[ \t\n]+\([a-zA-Z_][a-zA-Z_0-9]*\)' + '\([ \t\n]*=[ \t\n]*' + '\(\'[^\']*\';\|"[^"]*"\|[-a-zA-Z0-9./:+*%?!()_#]+\)\)?') k = tagfind.match(rawdata, i+1) |