Opened on 05/05/2018 at 01:16:02 AM
Closed on 05/08/2018 at 06:02:55 PM
Last modified on 07/05/2018 at 12:02:44 PM
#6649 closed change (fixed)
Allow the Unicode flag in :-abp-contains() regular expressions
Reported by: | mjethani | Assignee: | mjethani |
---|---|---|---|
Priority: | Unknown | Milestone: | |
Module: | Core | Keywords: | circumvention |
Cc: | hfiguiere, kzar, arthur | Blocked By: | |
Blocking: | Platform: | Unknown / Cross platform | |
Ready: | no | Confidential: | no |
Tester: | Ross | Verified working: | yes |
Review URL(s): |
Description (last modified by mjethani)
Background
See #6648.
It should be possible to specify the u flag in a :-abp-contains() regular expression. We already support the i and m flags.
What to change
Modify regexpRegexp in lib/content/elemHideEmulation.js to include the u flag.
Hints for testers
Given the document <!DOCTYPE html><div>hello🙂world</div>, the filter #?#div:-abp-contains(/hello.world/u) should hide the <div> while the filter #?#div:-abp-contains(/hello.world/) should not.
If a filter worked before this change, it should still work after this change. i.e. this change is backwards compatible.
Attachments (0)
Change History (9)
comment:1 Changed on 05/05/2018 at 01:16:32 AM by mjethani
- Description modified (diff)
- Summary changed from Allow the Unicode flag in :-abp-has() regular expressions to Allow the Unicode flag in :-abp-contains() regular expressions
comment:2 Changed on 05/05/2018 at 01:33:01 AM by mjethani
- Owner set to mjethani
comment:4 Changed on 05/05/2018 at 09:44:02 AM by arthur
- Cc arthur added
comment:5 Changed on 05/08/2018 at 05:52:07 PM by abpbot
comment:7 Changed on 05/08/2018 at 06:02:55 PM by mjethani
- Resolution set to fixed
- Status changed from new to closed
comment:9 Changed on 07/05/2018 at 12:02:44 PM by Ross
- Tester changed from Unknown to Ross
- Verified working set
Implemented and works as expected. Previous filters still work as expected.
ABP 3.1.0.2069
Chrome 67 / 64 / 49 / Windows 7
Firefox 60 / 55 / 51 / Windows 7
Opera 52 / 45 / 38 / Windows 7
A commit referencing this issue has landed:
Issue 6649 - Allow u flag in :-abp-contains()