From: Ezio Melotti Date: Mon, 13 Feb 2012 18:20:00 +0000 (+0200) Subject: Fix an index and clean up comments. X-Git-Tag: v3.2.3rc1~70 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e31ddedb0e5d0151cd4d7821365690ba9d22386d;p=thirdparty%2FPython%2Fcpython.git Fix an index and clean up comments. --- diff --git a/Lib/html/parser.py b/Lib/html/parser.py index 9db8ab582bec..aa31fbc5b1bd 100644 --- a/Lib/html/parser.py +++ b/Lib/html/parser.py @@ -270,12 +270,13 @@ class HTMLParser(_markupbase.ParserBase): if rawdata[i:i+2] != ' - gtpos = rawdata.find('>', 9) + gtpos = rawdata.find('>', i+9) if gtpos == -1: return -1 self.handle_decl(rawdata[i+2:gtpos]) diff --git a/Lib/test/test_htmlparser.py b/Lib/test/test_htmlparser.py index 1da2ce4f9b73..e2b09a96c039 100644 --- a/Lib/test/test_htmlparser.py +++ b/Lib/test/test_htmlparser.py @@ -393,7 +393,6 @@ class HTMLParserTolerantTestCase(HTMLParserStrictTestCase): self._run_check("", [('decl', 'DOCTYPE foo $ ')]) def test_illegal_declarations(self): - # XXX this might be wrong self._run_check('', [('comment', 'spacer type="block" height="25"')])