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