mirror of
https://github.com/openwrt/luci.git
synced 2026-04-15 10:51:51 +00:00
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 <jo@mein.io>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user