]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
allow _ in attr names (Netscape!)
authorGuido van Rossum <guido@python.org>
Sat, 30 Sep 1995 16:49:36 +0000 (16:49 +0000)
committerGuido van Rossum <guido@python.org>
Sat, 30 Sep 1995 16:49:36 +0000 (16:49 +0000)
Lib/sgmllib.py

index fc023ebd5832a99b45a0c3c0c65b0c9514fb1726..2b656862aa436a8e09ed32160c728c410d68f635 100644 (file)
@@ -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)