From cc043a7284a20781735f1e201a3c994a0e390ad7 Mon Sep 17 00:00:00 2001 From: Andrey Meshkov Date: Tue, 20 Oct 2015 15:34:34 +0300 Subject: [PATCH] https://github.com/AdguardTeam/AdguardBrowserExtension/issues/34 --- Extension/lib/filter/rules/base-filter-rule.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Extension/lib/filter/rules/base-filter-rule.js b/Extension/lib/filter/rules/base-filter-rule.js index e51c6fbcde..ed4064b80d 100644 --- a/Extension/lib/filter/rules/base-filter-rule.js +++ b/Extension/lib/filter/rules/base-filter-rule.js @@ -263,6 +263,11 @@ FilterRule.createRule = function (ruleText) { return rule; }; +/** + * urlencodes rule text. + * We need this function because of this issue: + * https://github.com/AdguardTeam/AdguardBrowserExtension/issues/34 + */ FilterRule.escapeRule = function (ruleText) { return encodeURIComponent(ruleText).replace(/'/g, "%27"); }; @@ -286,4 +291,3 @@ FilterRule.COMA_DELIMITER = ","; FilterRule.LINE_DELIMITER = "|"; FilterRule.NOT_MARK = "~"; FilterRule.OLD_INJECT_RULES = "adg_start_style_inject"; -