]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
SF Patch # 103839 byt dougfort: Allow ';' in attributes
authorGuido van Rossum <guido@python.org>
Mon, 19 Feb 2001 18:39:09 +0000 (18:39 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 19 Feb 2001 18:39:09 +0000 (18:39 +0000)
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

Lib/sgmllib.py

index 30acafd55b868a64e54dea1647487ae31c04a6ba..1f8f3b836a19be6c3cf7f2d760f4bf730131f328 100644 (file)
@@ -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.