From e3d9320fc570cb3a02240f41963e05a2b8d9f51a Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Sat, 30 Sep 1995 16:49:36 +0000 Subject: allow _ in attr names (Netscape!) --- Lib/sgmllib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v0.12