Opened on 03/26/2019 at 03:45:25 PM

Closed on 03/27/2019 at 06:57:45 AM

Last modified on 09/25/2019 at 01:21:47 PM

#7407 closed defect (fixed)

strip-fetch-query-parameter snippet does not work in Chrome 49

Reported by: Ross Assignee: mjethani
Priority: P3 Milestone:
Module: Core Keywords: circumvention
Cc: sebastian, kzar, mjethani, agiammarchi Blocked By:
Blocking: Platform: Chrome
Ready: yes Confidential: no
Tester: Ross Verified working: yes
Review URL(s):

https://gitlab.com/eyeo/adblockplus/adblockpluscore/merge_requests/39

Description (last modified by Ross)

Environment

ABP 2.5.0.2282
Chrome 49.0.2623.75
Opera 36.0.2130.80 (Which is Chrome 49)

How to reproduce

  1. Set up the example as shown in #7294.
  2. Add snippet filter to ABP and refresh page.

Observed behaviour

The page console reports:

VM378:15 Uncaught TypeError: Cannot read property 'delete' of undefined

Expected behaviour

The snippet to work in Chrome 49, or to fail gracefully.

Attachments (0)

Change History (13)

comment:1 Changed on 03/26/2019 at 03:47:31 PM by Ross

  • Sensitive set

comment:2 Changed on 03/26/2019 at 03:48:27 PM by Ross

  • Keywords circumvention added

comment:3 Changed on 03/26/2019 at 03:57:45 PM by Ross

  • Description modified (diff)

comment:4 Changed on 03/26/2019 at 11:00:27 PM by sebastian

  • Cc agiammarchi added
Last edited on 03/26/2019 at 11:03:40 PM by sebastian

comment:5 Changed on 03/27/2019 at 12:58:20 AM by mjethani

  • Priority changed from P4 to P3
  • Ready set

comment:6 Changed on 03/27/2019 at 01:07:18 AM by mjethani

The URL object did not have a searchParams property until Chrome 51.

Here's an alternative approach:

let url = new URL("https://example.com/?q=chocolate+cookies&trackingId=16859");
let params = new URLSearchParams(url.search);
params.delete("trackingId");
url.search = params;
console.log(url.href); // "https://example.com/?q=chocolate+cookies"

comment:7 Changed on 03/27/2019 at 04:19:47 AM by mjethani

  • Owner set to mjethani

comment:8 Changed on 03/27/2019 at 04:34:40 AM by mjethani

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:9 Changed on 03/27/2019 at 06:55:07 AM by abpbot

A commit referencing this issue has landed:
Issue 7407 - Use URLSearchParams instead of URL.searchParams

comment:10 Changed on 03/27/2019 at 06:56:37 AM by abpbot

A commit referencing this issue has landed:
Issue 7407 - Use URLSearchParams instead of URL.searchParams

comment:11 Changed on 03/27/2019 at 06:57:45 AM by mjethani

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

comment:12 Changed on 03/27/2019 at 03:33:57 PM by Ross

  • Tester changed from Unknown to Ross
  • Verified working set

Fixed. Working in Chrome 49 with and without urlPattern.

ABP 3.5.0.2283
Chrome 49.0.2623.75

comment:13 Changed on 09/25/2019 at 01:21:47 PM by mjethani

  • Sensitive unset

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 mjethani.
 
Note: See TracTickets for help on using tickets.