Commit 5b2ebcef authored by Aral Balkan's avatar Aral Balkan
Browse files

Updated the regex suffix for content blocker rules to make it optional for...

Updated the regex suffix for content blocker rules to make it optional for greater flexibility in Blockdown rule authoring.
parent f3a983f8
......@@ -61,7 +61,7 @@ class ContentBlockerRule
# https://webkit.org/blog/4062/targeting-domains-with-content-blockers/
#
prefix = '^[^:]+://+([^:/]+\\.)?'
suffix = '[:/]'
suffix = '[:/]?'
valueEscaped = value.replace '.', '\\.'
valueRegex = "#{prefix}#{valueEscaped}#{suffix}"
@rule.trigger['url-filter'] = valueRegex
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment