From a00624d7fc2e29b41b286f46844cb75f4d96ff63 Mon Sep 17 00:00:00 2001 From: Leonard Richardson Date: Mon, 31 May 2021 15:49:41 -0400 Subject: The html.parser tree builder can now handles named entities found in the HTML5 spec in much the same way that the html5lib tree builder does. Note that the lxml tree builder still handles named entities differently. [bug=1924908] --- bs4/testing.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'bs4/testing.py') diff --git a/bs4/testing.py b/bs4/testing.py index 87cd13f..5b0eb7c 100644 --- a/bs4/testing.py +++ b/bs4/testing.py @@ -234,13 +234,13 @@ class TreeBuilderSmokeTest(object): def test_fuzzed_input(self): # This test centralizes in one place the various fuzz tests - # for Beautiful Soup created by the oss-fuzz. + # for Beautiful Soup created by the oss-fuzz project. # These strings superficially resemble markup, but they # generally can't be parsed into anything. The best we can # hope for is that parsing these strings won't crash the # parser. - + # # n.b. This markup is commented out because these fuzz tests # _do_ crash the parser. However the crashes are due to bugs # in html.parser, not Beautiful Soup -- otherwise I'd fix the @@ -261,7 +261,6 @@ class TreeBuilderSmokeTest(object): for markup in bad_markup: with warnings.catch_warnings(record=False): soup = self.soup(markup) - pass class HTMLTreeBuilderSmokeTest(TreeBuilderSmokeTest): @@ -625,7 +624,7 @@ Hello, world! self.assertSoupEquals("�", expect) self.assertSoupEquals("�", expect) self.assertSoupEquals("�", expect) - + def test_multipart_strings(self): "Mostly to prevent a recurrence of a bug in the html5lib treebuilder." soup = self.soup("

\nfoo

") -- cgit v1.2.3