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

Skip to content

Commit b68c245

Browse files
committed
SF Patch # 103839 byt dougfort: Allow ';' in attributes
sgmllib does not recognize HTML attributes containing the semicolon ';' character. This may be in accordance with the HTML spec, but there are sites that use it (excite.com) and the browsers I regularly use (IE5, Netscape, Opera) all handle it. Doug Fort Downright Software LLC
1 parent 8ba9445 commit b68c245

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
@@ -38,7 +38,7 @@
3838
attrfind = re.compile(
3939
'[%s]*([a-zA-Z_][-.a-zA-Z_0-9]*)' % string.whitespace
4040
+ ('([%s]*=[%s]*' % (string.whitespace, string.whitespace))
41-
+ r'(\'[^\']*\'|"[^"]*"|[-a-zA-Z0-9./:+*%?!&$\(\)_#=~]*))?')
41+
+ r'(\'[^\']*\'|"[^"]*"|[-a-zA-Z0-9./:;+*%?!&$\(\)_#=~]*))?')
4242

4343

4444
# SGML parser base class -- find tags and call handler functions.

0 commit comments

Comments
 (0)