Skip to content

Commit

Permalink
client: use backslash to escape quotes in the client name
Browse files Browse the repository at this point in the history
  • Loading branch information
IldarKamalov committed Aug 16, 2021
1 parent 394c2f6 commit e7c19dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/actions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e7c19dd

Please sign in to comment.