luci-proto-openconnect: explicitely escape slashes in regex literals
authorJo-Philipp Wich <jo@mein.io>
Tue, 21 Jan 2020 17:38:46 +0000 (18:38 +0100)
committerJo-Philipp Wich <jo@mein.io>
Wed, 22 Jan 2020 21:02:24 +0000 (22:02 +0100)
The unespaced slashes confuse xgettext and likely other source
scanners as well.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
protocols/luci-proto-openconnect/htdocs/luci-static/resources/protocol/openconnect.js

index 0490ceb5ea53049b31846ab3845d39d190e193b5..86fd27f294d4061cf44db492160d514fb29d044f 100644 (file)
@@ -49,7 +49,7 @@ function validateCert(priv, section_id, value) {
        for (i = 0; i < lines.length; i++) {
                if (lines[i].match(beg))
                        start = true;
-               else if (start && !lines[i].match(/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/))
+               else if (start && !lines[i].match(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/))
                        break;
        }