From: Jo-Philipp Wich Date: Tue, 21 Jan 2020 17:38:04 +0000 (+0100) Subject: luci-proto-wireguard: explicitely escape slashes in regex literals X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=f1c89c103b6e5109d45a7573f707fb83d8365ce2;p=project%2Fluci.git luci-proto-wireguard: explicitely escape slashes in regex literals The unespaced slashes confuse xgettext and likely other source scanners as well. Signed-off-by: Jo-Philipp Wich --- diff --git a/protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js b/protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js index ab76326eee..c9b00abdec 100644 --- a/protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js +++ b/protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js @@ -6,7 +6,7 @@ function validateBase64(section_id, value) { if (value.length == 0) return true; - if (value.length != 44 || !value.match(/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/)) + if (value.length != 44 || !value.match(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)) return _('Invalid Base64 key string'); return true;