From 7381e17c08cb62bb1ddeecbdb1aac28589fa3ddb Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 26 May 2022 10:08:02 +0100 Subject: [PATCH] Function to remove scripts from content --- content.py | 25 +++++++++++++++++++++++++ tests.py | 14 ++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/content.py b/content.py index a640b35b2..e0d8dcd46 100644 --- a/content.py +++ b/content.py @@ -1681,3 +1681,28 @@ def create_edits_html(edits_json: {}, post_json_object: {}, return '
' + \ translate['SHOW EDITS'] + '' + \ edits_str + '
' + + +def remove_script(content: str) -> str: + """Removes