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

Skip to content

Commit 8600b47

Browse files
committed
Be more permissive in what is accepted as an attribute name; this makes
this module slightly more resiliant in the face of XHTML input, or just colons in attribute names.
1 parent 3eb7860 commit 8600b47

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
@@ -36,7 +36,7 @@
3636
commentclose = re.compile(r'--\s*>')
3737
tagfind = re.compile('[a-zA-Z][-_.a-zA-Z0-9]*')
3838
attrfind = re.compile(
39-
r'\s*([a-zA-Z_][-.a-zA-Z_0-9]*)(\s*=\s*'
39+
r'\s*([a-zA-Z_][-:.a-zA-Z_0-9]*)(\s*=\s*'
4040
r'(\'[^\']*\'|"[^"]*"|[-a-zA-Z0-9./:;+*%?!&$\(\)_#=~\'"]*))?')
4141

4242
decldata = re.compile(r'[^>\'\"]+')

0 commit comments

Comments
 (0)