summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-02-19 18:39:09 (GMT)
committerGuido van Rossum <guido@python.org>2001-02-19 18:39:09 (GMT)
commitb68c24566261cce4cea6f12b79a2311bddaa28b5 (patch)
treee1348f2cd64bf38c9913b2f4ab65c227e483fff3 /Lib
parent8ba9445dd3d0ed68a134e5e0dd1f1325bc23ae3b (diff)
downloadcpython-b68c24566261cce4cea6f12b79a2311bddaa28b5.zip
cpython-b68c24566261cce4cea6f12b79a2311bddaa28b5.tar.gz
cpython-b68c24566261cce4cea6f12b79a2311bddaa28b5.tar.bz2
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
Diffstat (limited to 'Lib')
-rw-r--r--Lib/sgmllib.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/sgmllib.py b/Lib/sgmllib.py
index 30acafd..1f8f3b8 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.