diff options
| author | Paul Donald | 2026-02-16 01:49:03 +0000 |
|---|---|---|
| committer | Paul Donald | 2026-02-16 01:49:37 +0000 |
| commit | d7eb5535967a1a83fbae4a3e39c1534c00ff674a (patch) | |
| tree | 770edbf827d6b68d6499690eec01c73a97e8d9f4 | |
| parent | d932d7cac2b573f61721c1d180e25f8fb68c725d (diff) | |
| download | luci-d7eb5535967a1a83fbae4a3e39c1534c00ff674a.tar.gz | |
luci-mod-system: change regex to please jsmin
Also trim out unused function
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
| -rw-r--r-- | modules/luci-mod-system/htdocs/luci-static/resources/view/system/repokeys.js | 10 |
1 files changed, 2 insertions, 8 deletions
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 7785ee4320..c6dfcbdc4e 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 @@ -56,12 +56,6 @@ function listKeyFiles() { ); } -function safeText(str) { - return String(str).replace(/[&<>"']/g, s => ({ - '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' - }[s])); -} - function saveKeyFile(keyContent, file, fileContent) { const ts = Date.now(); // Note: opkg can only verify against a key with filename that matches its key hash @@ -92,7 +86,7 @@ function removeKey(ev, key) { } function isPemFormat(content) { - return new RegExp('-BEGIN ([A-Z ]+)?PUBLIC KEY-').test(content); + return (/-BEGIN ([A-Z ]+)?PUBLIC KEY-/.test(content)); } function keyEnvironmentCheck(key) { @@ -274,7 +268,7 @@ return view.extend({ s = m.section(form.NamedSection, 'fup'); o = s.option(form.DummyValue, '_newkey'); - o.cfgvalue = function(section_id) { + o.cfgvalue = function(/* section_id*/) { const addInput = E('textarea', { id: 'key-input', |