Opened on 06/28/2018 at 05:01:02 PM
Closed on 02/15/2019 at 09:06:46 PM
#6770 closed change (duplicate)
Allow the "s" flag in :-abp-contains() regular expressions
Reported by: | mapx | Assignee: | hfiguiere |
---|---|---|---|
Priority: | Unknown | Milestone: | |
Module: | Unknown | Keywords: | |
Cc: | mjethani, kzar, hfiguiere, arthur, greiner | Blocked By: | |
Blocking: | Platform: | Unknown / Cross platform | |
Ready: | no | Confidential: | no |
Tester: | Unknown | Verified working: | no |
Review URL(s): |
Description (last modified by mapx)
Environment
firefox / chrome widows 7/10
last ABP dev build
How to reproduce
go to
https://www.quora.com/Is-China-safe-for-tourists
quora is using 2 spaces between "ad" and "by"
a filter like (2 spaces ! between ad and by) :
quora.com#?#[id*=wrapper]:-abp-contains(/ad by/i)
is working
but it would be much better supporting a filter like:
quora.com#?#[id*=wrapper]:-abp-contains(/ad\s{1,}by /i)
Observed behaviour
\s is not supported by abp-contains
Expected behaviour
implement \s flag
Notes
uBo is supporting such flag, for example
quora.com##[id*=wrapper]:has-text(/ad\s{1,}by /i)
Attachments (0)
Change History (8)
comment:2 Changed on 06/29/2018 at 02:36:37 PM by mapx
- Type changed from defect to change
comment:3 Changed on 07/01/2018 at 08:52:19 AM by hfiguiere
comment:5 Changed on 07/02/2018 at 01:20:34 PM by mjethani
I have not confirmed, but this is probably not working because of the CSS escaping, which we want to get rid of (#6726). /ad\s{1,}by/ doesn't work but /ad\s+by/ works.
comment:6 Changed on 07/05/2018 at 08:49:58 AM by hfiguiere
- Owner set to hfiguiere
comment:7 Changed on 07/10/2018 at 12:09:28 PM by greiner
- Cc greiner added
I am actually surprised. There is even a test where we use the following RegExp /to\shide/
I'll investigate further.