From ca2b1378c65b851ae04fc1d6c2a63171e8a6207a Mon Sep 17 00:00:00 2001 From: remittor Date: Sat, 19 Apr 2025 10:02:57 +0300 Subject: [PATCH] luci: Fix view multiline for NFQWS_OPT --- .../htdocs/luci-static/resources/view/zapret/settings.js | 2 +- .../htdocs/luci-static/resources/view/zapret/tools.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/luci-app-zapret/htdocs/luci-static/resources/view/zapret/settings.js b/luci-app-zapret/htdocs/luci-static/resources/view/zapret/settings.js index 3270170..0e9efa4 100644 --- a/luci-app-zapret/htdocs/luci-static/resources/view/zapret/settings.js +++ b/luci-app-zapret/htdocs/luci-static/resources/view/zapret/settings.js @@ -190,7 +190,7 @@ return view.extend({ o.datatype = 'uinteger'; add_delim(s); - add_param(s, 'NFQWS_OPT', null, 18, 2); + add_param(s, 'NFQWS_OPT', null, 21, 2); /* AutoHostList settings */ diff --git a/luci-app-zapret/htdocs/luci-static/resources/view/zapret/tools.js b/luci-app-zapret/htdocs/luci-static/resources/view/zapret/tools.js index 80a071f..80274ea 100644 --- a/luci-app-zapret/htdocs/luci-static/resources/view/zapret/tools.js +++ b/luci-app-zapret/htdocs/luci-static/resources/view/zapret/tools.js @@ -440,6 +440,9 @@ return baseclass.extend({ if (typeof(value) === 'string') { value = value.trim(); if (this.multiline == 2) { + value = value.replace(/\n\t\t\t--/g, "\n--"); + value = value.replace(/\n\t\t--/g, "\n--"); + value = value.replace(/\n\t--/g, "\n--"); value = value.replace(/\n --/g, "\n--"); value = value.replace(/\n --/g, "\n--"); value = value.replace(/ --/g, "\n--");