From b47c94cabb1286a856a3c097544610ad691ba9d2 Mon Sep 17 00:00:00 2001 From: Andy Chiang Date: Mon, 20 Oct 2025 08:22:11 +0700 Subject: [PATCH] luci-mod-system: fix JSMIN Error jsmin cannot handle regular expressions in this format, so use RegExp() instead. fixes: #8020 Signed-off-by: Andy Chiang --- .../htdocs/luci-static/resources/view/system/repokeys.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/repokeys.js b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/repokeys.js index 6703a50970..2b1b757198 100644 --- a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/repokeys.js +++ b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/repokeys.js @@ -117,7 +117,7 @@ function removeKey(ev) { } function isPemFormat(content) { - return /-BEGIN ([A-Z ]+)?PUBLIC KEY-/.test(content); + return new RegExp('-BEGIN ([A-Z ]+)?PUBLIC KEY-').test(content); } function keyEnvironmentCheck(key) { -- 2.30.2