From b4a3d461e4a00dfc60047b667aa3136c8b03eda8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergey=20M=E2=80=A4?= Date: Mon, 12 Jun 2017 01:52:24 +0700 Subject: [utils] Handle HTMLParseError in extract_attributes (closes #13349) --- test/test_utils.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/test_utils.py') diff --git a/test/test_utils.py b/test/test_utils.py index 41b094d89..2b93b3604 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -916,6 +916,8 @@ class TestUtil(unittest.TestCase): supports_outside_bmp = False if supports_outside_bmp: self.assertEqual(extract_attributes(''), {'x': 'Smile \U0001f600!'}) + # Malformed HTML should not break attributes extraction on older Python + self.assertEqual(extract_attributes(''), {}) def test_clean_html(self): self.assertEqual(clean_html('a:\nb'), 'a: b') -- cgit v1.2.3