From e7c19ddb1a5041447d9612783415ba21fcad802e Mon Sep 17 00:00:00 2001 From: Ildar Kamalov Date: Mon, 16 Aug 2021 12:04:43 +0300 Subject: [PATCH] client: use backslash to escape quotes in the client name --- client/src/actions/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/actions/index.js b/client/src/actions/index.js index 4f4b6b20363..cc7ac63a95a 100644 --- a/client/src/actions/index.js +++ b/client/src/actions/index.js @@ -638,7 +638,7 @@ export const toggleBlocking = ( }; export const toggleBlockingForClient = (type, domain, client) => { - const baseRule = `||${domain}^$client='${client.replace(/'/g, '/\'')}'`; + const baseRule = `||${domain}^$client='${client.replace(/'/g, '\\\'')}'`; const baseUnblocking = `@@${baseRule}`; return toggleBlocking(type, domain, baseRule, baseUnblocking);