From: Guido van Rossum Date: Sat, 30 Sep 1995 16:49:36 +0000 (+0000) Subject: allow _ in attr names (Netscape!) X-Git-Tag: v1.3~89 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e3d9320fc570cb3a02240f41963e05a2b8d9f51a;p=thirdparty%2FPython%2Fcpython.git allow _ in attr names (Netscape!) --- diff --git a/Lib/sgmllib.py b/Lib/sgmllib.py index fc023ebd5832..2b656862aa43 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)