From a73f781fb19060f082ad4b57d7a33d2abdd0ba48 Mon Sep 17 00:00:00 2001 From: JeffreyGilbert Date: Wed, 16 Dec 2020 20:06:36 -0800 Subject: [PATCH] Added a few lines of code to sanitize html elements that might get injected to a website --- src/normalize.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/normalize.js b/src/normalize.js index f702717..127a926 100644 --- a/src/normalize.js +++ b/src/normalize.js @@ -1,3 +1,18 @@ +function SanitizeHtml(html) { + const SCRIPT_REGEX = /)<[^<]*)*<\/script>/gi + + // Removing the