Skip to content

Commit

Permalink
Merge branch 'master' into 3438-inputs-height
Browse files Browse the repository at this point in the history
  • Loading branch information
IldarKamalov committed Aug 16, 2021
2 parents 7035339 + 42b2c3a commit a049feb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion client/src/actions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,11 @@ export const toggleBlocking = (
};

export const toggleBlockingForClient = (type, domain, client) => {
const baseRule = `||${domain}^$client='${client.replace(/'/g, '/\'')}'`;
const escapedClientName = client.replace(/'/g, '\\\'')
.replace(/"/g, '\\"')
.replace(/,/g, '\\,')
.replace(/\|/g, '\\|');
const baseRule = `||${domain}^$client='${escapedClientName}'`;
const baseUnblocking = `@@${baseRule}`;

return toggleBlocking(type, domain, baseRule, baseUnblocking);
Expand Down

0 comments on commit a049feb

Please sign in to comment.