HTMLParser is allowed to be more strict than sgmllib, so let's not
change their basic behavior:  When parsing something that cannot possibly
be valid in either HTML or XHTML, raise an exception.
diff --git a/Lib/test/test_htmlparser.py b/Lib/test/test_htmlparser.py
index 4e8e73c..8661066 100755
--- a/Lib/test/test_htmlparser.py
+++ b/Lib/test/test_htmlparser.py
@@ -203,12 +203,7 @@
             ])
 
     def test_illegal_declarations(self):
-        s = 'abc<!spacer type="block" height="25">def'
-        self._run_check(s, [
-            ("data", "abc"),
-            ("unknown decl", 'spacer type="block" height="25"'),
-            ("data", "def"),
-            ])
+        self._parse_error('<!spacer type="block" height="25">')
 
     def test_starttag_end_boundary(self):
         self._run_check("""<a b='<'>""", [("starttag", "a", [("b", "<")])])