From 374714aa9e4bfdf13e13321e4ea9827c885dd87f Mon Sep 17 00:00:00 2001 From: Ilya Rodionov Date: Sun, 11 Feb 2024 22:45:47 +0700 Subject: [PATCH] Support injected JS in script tag with type module (fixed #13) --- .../kotlin/ris58h/webcalm/html/HtmlRelatedScriptsProcessor.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/ris58h/webcalm/html/HtmlRelatedScriptsProcessor.kt b/src/main/kotlin/ris58h/webcalm/html/HtmlRelatedScriptsProcessor.kt index ed41dae..c2f75c6 100644 --- a/src/main/kotlin/ris58h/webcalm/html/HtmlRelatedScriptsProcessor.kt +++ b/src/main/kotlin/ris58h/webcalm/html/HtmlRelatedScriptsProcessor.kt @@ -63,5 +63,5 @@ class HtmlRelatedScriptsProcessor : RelatedScriptsProcessor { fun isJavaScriptScriptTag(scriptTag: XmlTag): Boolean { val type = scriptTag.getAttributeValue("type") - return type.isNullOrEmpty() || type == "text/javascript" + return type.isNullOrEmpty() || type == "text/javascript" || type == "module" } \ No newline at end of file