Opened 17 months ago

Closed 17 months ago

Last modified 15 months ago

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

https://codereview.adblockplus.org/29770601/

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&#128578;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.

Change History (9)

comment:1 Changed 17 months ago 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 17 months ago by mjethani

  • Owner set to mjethani

comment:3 Changed 17 months ago by mjethani

  • Review URL(s) modified (diff)

comment:4 Changed 17 months ago by arthur

  • Cc arthur added

comment:5 Changed 17 months ago by abpbot

A commit referencing this issue has landed:
Issue 6649 - Allow u flag in :-abp-contains()

comment:6 Changed 17 months ago by mjethani

  • Description modified (diff)

comment:7 Changed 17 months ago by mjethani

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

comment:8 Changed 17 months ago by mjethani

  • Description modified (diff)

comment:9 Changed 15 months ago 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

Note: See TracTickets for help on using tickets.