Kaydet (Commit) 8600b47b authored tarafından Fred Drake's avatar Fred Drake

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.
üst 3eb78609
......@@ -36,7 +36,7 @@ commentopen = re.compile('<!--')
commentclose = re.compile(r'--\s*>')
tagfind = re.compile('[a-zA-Z][-_.a-zA-Z0-9]*')
attrfind = re.compile(
r'\s*([a-zA-Z_][-.a-zA-Z_0-9]*)(\s*=\s*'
r'\s*([a-zA-Z_][-:.a-zA-Z_0-9]*)(\s*=\s*'
r'(\'[^\']*\'|"[^"]*"|[-a-zA-Z0-9./:;+*%?!&$\(\)_#=~\'"]*))?')
decldata = re.compile(r'[^>\'\"]+')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment