From 6b6348b536b25ebf8af3d76e3843a9e66272d6eb Mon Sep 17 00:00:00 2001 From: Allan Stockman RUGANO Date: Wed, 18 Dec 2024 12:38:30 +0100 Subject: [PATCH] Fix code scanning alert no. 26: Bad HTML filtering regexp Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- .../apps/power_query/static/admin/power_query/codemirror/xml.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hope_country_report/apps/power_query/static/admin/power_query/codemirror/xml.js b/src/hope_country_report/apps/power_query/static/admin/power_query/codemirror/xml.js index b7f44025..4abb31ae 100644 --- a/src/hope_country_report/apps/power_query/static/admin/power_query/codemirror/xml.js +++ b/src/hope_country_report/apps/power_query/static/admin/power_query/codemirror/xml.js @@ -79,7 +79,7 @@ CodeMirror.defineMode("xml", function(editorConf, config_) { if (stream.match("CDATA[")) return chain(inBlock("atom", "]]>", "]]>")); else return null; } else if (stream.match("--")) { - return chain(inBlock("comment", /-->/, /--!>/)); + return chain(inBlock("comment", /-->/, /--(?:!>)/)); } else if (stream.match("DOCTYPE", true, true)) { stream.eatWhile(/[\w\._\-]/); return chain(doctype(1));