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)
Environment
Adblock Plus with Snippets as of changeset b3488684866c
How to reproduce
- Write a snippet function foo(one, two, three) { console.log("one=" + one, "two=" + two, "three=" + three); } in the snippets library
- Write a snippet filter example.com#$#foo 1 '' 3
- Visit http://example.com
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 example.com$#$log Hello '' world on example.com. 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
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.
ABP 3.3.2.2175
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
A commit referencing this issue has landed:
Issue 6811 - Parse blank arguments to snippets correctly