From 9f548fedcb74b527825078fe31f5748499f2937d Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 13 Nov 2023 18:47:28 -0800 Subject: [PATCH] Fix pathological regex for HTML comments. Closes #273. --- lib/common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common.js b/lib/common.js index 4139e80b..dd8f6984 100644 --- a/lib/common.js +++ b/lib/common.js @@ -24,7 +24,7 @@ var ATTRIBUTEVALUESPEC = "(?:" + "\\s*=" + "\\s*" + ATTRIBUTEVALUE + ")"; var ATTRIBUTE = "(?:" + "\\s+" + ATTRIBUTENAME + ATTRIBUTEVALUESPEC + "?)"; var OPENTAG = "<" + TAGNAME + ATTRIBUTE + "*" + "\\s*/?>"; var CLOSETAG = "]"; -var HTMLCOMMENT = "||" +var HTMLCOMMENT = "||" var PROCESSINGINSTRUCTION = "[<][?][\\s\\S]*?[?][>]"; var DECLARATION = "]*>"; var CDATA = "";