From f77e0f6392177a06e46a49abd61a4d9f035e57fd Mon Sep 17 00:00:00 2001 From: Greg Guthe Date: Thu, 13 Feb 2020 16:09:52 -0500 Subject: [PATCH] fix bug 1615315 --- bleach/html5lib_shim.py | 7 ++++++- tests/test_clean.py | 28 ++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/bleach/html5lib_shim.py b/bleach/html5lib_shim.py index f18e4225..20d7e22b 100644 --- a/bleach/html5lib_shim.py +++ b/bleach/html5lib_shim.py @@ -377,7 +377,12 @@ def __init__(self, tags, strip, consume_entities, **kwargs): self.consume_entities = consume_entities super(BleachHTMLParser, self).__init__(**kwargs) - def _parse(self, stream, innerHTML=False, container='div', scripting=False, **kwargs): + def _parse(self, stream, innerHTML=False, container='div', scripting=True, **kwargs): + # set scripting=True to parse