Changes between Initial Version and Version 1 of Ticket #5325


Ignore:
Timestamp:
06/16/2017 05:21:31 PM (3 years ago)
Author:
mjethani
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5325 – Description

    initial v1  
    11=== Background === 
    2 Currently `abp2blocklist` will convert `example.co^` into `example\.co` and `example.co^hello` into `example\.co.hello`. This will match `example.co` as well as `example.com`, which is wrong. Based on the filters documentation, the correct patterns to generate are `example\.co([^.%A-Za-z0-9_].*)?$` and `example\.co[^.%A-Za-z0-9_]hello` respectively. 
     2Currently `abp2blocklist` will convert `example.co^` into `example\.co` and `example.co^hello` into `example\.co.hello`. This will match `example.co` as well as `example.com`, which is wrong. Based on the [https://adblockplus.org/filters#separators filters documentation], the correct patterns to generate are `example\.co([^.%A-Za-z0-9_].*)?$` and `example\.co[^.%A-Za-z0-9_]hello` respectively. 
    33 
    44=== What to change === 
    55Modify the `parseFilterRegexpSource` function to generate the correct pattern. 
     6 
     7Note that the `-` character is also a separator character, but we cannot exclude it here because the domain is already Punycode-encoded during matching so the next character may very well be `-`.