Opened 9 months ago

Closed 9 months ago

Last modified 3 months ago

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

Change History (13)

comment:1 Changed 9 months ago by Ross

  • Sensitive set

comment:2 Changed 9 months ago by Ross

  • Keywords circumvention added

comment:3 Changed 9 months ago by Ross

  • Description modified (diff)

comment:4 Changed 9 months ago by sebastian

  • Cc agiammarchi added
Last edited 9 months ago by sebastian (previous) (diff)

comment:5 Changed 9 months ago by mjethani

  • Priority changed from P4 to P3
  • Ready set

comment:6 Changed 9 months ago 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 9 months ago by mjethani

  • Owner set to mjethani

comment:8 Changed 9 months ago by mjethani

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

comment:9 Changed 9 months ago by abpbot

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

comment:10 Changed 9 months ago by abpbot

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

comment:11 Changed 9 months ago by mjethani

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

comment:12 Changed 9 months ago 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 3 months ago by mjethani

  • Sensitive unset
Note: See TracTickets for help on using tickets.