From: Guido van Rossum Date: Mon, 19 Feb 2001 18:39:09 +0000 (+0000) Subject: SF Patch # 103839 byt dougfort: Allow ';' in attributes X-Git-Tag: v2.1b1~280 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b68c24566261cce4cea6f12b79a2311bddaa28b5;p=thirdparty%2FPython%2Fcpython.git 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 --- diff --git a/Lib/sgmllib.py b/Lib/sgmllib.py index 30acafd55b86..1f8f3b836a19 100644 --- a/Lib/sgmllib.py +++ b/Lib/sgmllib.py @@ -38,7 +38,7 @@ tagfind = re.compile('[a-zA-Z][-.a-zA-Z0-9]*') attrfind = re.compile( '[%s]*([a-zA-Z_][-.a-zA-Z_0-9]*)' % string.whitespace + ('([%s]*=[%s]*' % (string.whitespace, string.whitespace)) - + r'(\'[^\']*\'|"[^"]*"|[-a-zA-Z0-9./:+*%?!&$\(\)_#=~]*))?') + + r'(\'[^\']*\'|"[^"]*"|[-a-zA-Z0-9./:;+*%?!&$\(\)_#=~]*))?') # SGML parser base class -- find tags and call handler functions.