Opened 2 years ago

Closed 20 months ago

#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)


firefox / chrome widows 7/10
last ABP dev build

How to reproduce

go to

quora is using 2 spaces between "ad" and "by"

a filter like (2 spaces ! between ad and by) :[id*=wrapper]:-abp-contains(/ad  by/i)

is working

but it would be much better supporting a filter like:[id*=wrapper]:-abp-contains(/ad\s{1,}by /i)

Observed behaviour

\s is not supported by abp-contains

Expected behaviour

implement \s flag


uBo is supporting such flag, for example[id*=wrapper]:has-text(/ad\s{1,}by /i)

Change History (8)

comment:1 Changed 2 years ago by mapx

  • Description modified (diff)

comment:2 Changed 2 years ago by mapx

  • Type changed from defect to change

comment:3 Changed 2 years ago by hfiguiere

I am actually surprised. There is even a test where we use the following RegExp /to\shide/

I'll investigate further.

comment:4 Changed 2 years ago by mapx

  • Description modified (diff)

comment:5 Changed 2 years ago 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 2 years ago by hfiguiere

  • Owner set to hfiguiere

comment:7 Changed 2 years ago by greiner

  • Cc greiner added

comment:8 Changed 20 months ago by hfiguiere

  • Resolution set to duplicate
  • Status changed from new to closed

This was fixed with issue #7268

Note: See TracTickets for help on using tickets.