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 <AndyChiang_git@outlook.com>
This commit is contained in:
Andy Chiang
2025-10-20 08:22:11 +07:00
committed by Paul Donald
parent 2f000b5e15
commit b47c94cabb

View File

@@ -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) {