summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-09-30 16:49:36 (GMT)
committerGuido van Rossum <guido@python.org>1995-09-30 16:49:36 (GMT)
commite3d9320fc570cb3a02240f41963e05a2b8d9f51a (patch)
tree96b0704d1c366ca278496579c44e467328c2e31c
parent4f399fb6429d7f84de1f881f1fc3968619d9af2e (diff)
downloadcpython-e3d9320fc570cb3a02240f41963e05a2b8d9f51a.zip
cpython-e3d9320fc570cb3a02240f41963e05a2b8d9f51a.tar.gz
cpython-e3d9320fc570cb3a02240f41963e05a2b8d9f51a.tar.bz2
allow _ in attr names (Netscape!)
-rw-r--r--Lib/sgmllib.py2
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)