Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e3d9320

Browse files
committed
allow _ in attr names (Netscape!)
1 parent 4f399fb commit e3d9320

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/sgmllib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def parse_starttag(self, i):
176176
attrs = []
177177
tagfind = regex.compile('[a-zA-Z][a-zA-Z0-9]*')
178178
attrfind = regex.compile(
179-
'[ \t\n]+\([a-zA-Z][a-zA-Z0-9]*\)' +
179+
'[ \t\n]+\([a-zA-Z_][a-zA-Z_0-9]*\)' +
180180
'\([ \t\n]*=[ \t\n]*' +
181181
'\(\'[^\']*\';\|"[^"]*"\|[-a-zA-Z0-9./:+*%?!()_#]+\)\)?')
182182
k = tagfind.match(rawdata, i+1)

0 commit comments

Comments
 (0)