Opened on 07/27/2018 at 11:26:23 AM

Closed on 08/11/2018 at 03:49:10 AM

Last modified on 02/11/2019 at 03:08:00 PM

#6811 closed defect (fixed)

Blank values for snippet arguments are ignored

Reported by: mjethani Assignee: mjethani
Priority: P2 Milestone:
Module: Core Keywords: circumvention
Cc: kzar, rscott, Ross Blocked By:
Blocking: #6538 Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Ross Verified working: yes
Review URL(s):

Description (last modified by mjethani)


Adblock Plus with Snippets as of changeset b3488684866c

How to reproduce

  1. Write a snippet function foo(one, two, three) { console.log("one=" + one, "two=" + two, "three=" + three); } in the snippets library
  2. Write a snippet filter$#foo 1 '' 3
  3. Visit

Observed behaviour

Prints one=1, two=3, three=undefined

Expected behaviour

Prints one=1, two=, three=3

Additional notes

The parsing code in lib/snippets.js needs to be modified to accept blank values for arguments.

Hints for testers

Try the filter$#$log Hello '' world on It should print "Hello" followed by "world" to the console, on the same line, but with two spaces between "Hello" and "world".

Attachments (0)

Change History (10)

comment:1 Changed on 07/27/2018 at 11:26:46 AM by mjethani

  • Component changed from Unknown to Core

comment:2 Changed on 07/27/2018 at 11:31:12 AM by mjethani

  • Sensitive set

comment:3 Changed on 08/10/2018 at 03:25:56 PM by mjethani

  • Owner set to mjethani

comment:4 Changed on 08/10/2018 at 03:26:08 PM by mjethani

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

comment:5 Changed on 08/11/2018 at 03:35:40 AM by abpbot

A commit referencing this issue has landed:
Issue 6811 - Parse blank arguments to snippets correctly

comment:6 Changed on 08/11/2018 at 03:48:45 AM by mjethani

  • Description modified (diff)

comment:7 Changed on 08/11/2018 at 03:49:10 AM by mjethani

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

comment:8 Changed on 08/11/2018 at 03:51:42 AM by mjethani

  • Cc rscott Ross added

comment:9 Changed on 10/23/2018 at 02:17:56 PM by Ross

  • Tester changed from Unknown to Ross
  • Verified working set

Fixed. Blank values are not ignored.

Firefox 62 / 51 / Windows 10
Chrome 69 / 49 / Windows 10
Opera 56 / 36 / Windows 10

comment:10 Changed on 02/11/2019 at 03:08:00 PM by mjethani

  • Sensitive unset

Add Comment

Modify Ticket

Change Properties
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.