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:1 Changed on 06/28/2018 at 05:02:00 PM by mapx

  • Description modified (diff)

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

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

I'll investigate further.

comment:4 Changed on 07/01/2018 at 09:31:48 AM by mapx

  • Description modified (diff)

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

comment:8 Changed on 02/15/2019 at 09:06:46 PM by hfiguiere

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

This was fixed with issue #7268

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from hfiguiere.
 
Note: See TracTickets for help on using tickets.