We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The rule found in the uBlock filterlist is processed incorrectly with the package v1.26.8 and it breaks amazon.com product pages.
Rule:
www.amazon.co.jp,www.amazon.com,www.amazon.de##+js(xml-prune, xpath(//*[name()="Period"][.//*[@value="Ad"]] | //*[name()="Period"]/@start), [value="Ad"], .mpd)
Added a simple test case to check parsing results:
it('parses amazon scriptlet arguments', () => { const [scriptlet, expected] = [ 'xml-prune, xpath(//*[name()="Period"][.//*[@value="Ad"]] | //*[name()="Period"]/@start), [value="Ad"], .mpd', { name: 'xml-prune', args: [ 'xpath(//*[name()="Period"][.//*[@value="Ad"]] | //*[name()="Period"]/@start)', '[value="Ad"]', '.mpd', ], }, ]; expect(CosmeticFilter.parse(`foo.com##+js(${scriptlet})`)?.parseScript(), scriptlet).to.eql( expected, ); });
The result is that all the arguments are parsed as a single string, instead of being split to 3 different strings.
scriptlets arguments parsing parses amazon scriptlet arguments: xml-prune, xpath(//*[name()="Period"][.//*[@value="Ad"]] | //*[name()="Period"]/@start), [value="Ad"], .mpd + expected - actual { "args": [ - "xpath(//*[name()=\"Period\"][.//*[@value=\"Ad\"]] | //*[name()=\"Period\"]/@start), [value=\"Ad\"], .mpd" + "xpath(//*[name()=\"Period\"][.//*[@value=\"Ad\"]] | //*[name()=\"Period\"]/@start)" + "[value=\"Ad\"]" + ".mpd" ] "name": "xml-prune" }
The text was updated successfully, but these errors were encountered:
seems to be fixed with #3558
Sorry, something went wrong.
No branches or pull requests
The rule found in the uBlock filterlist is processed incorrectly with the package v1.26.8 and it breaks amazon.com product pages.
Rule:
Added a simple test case to check parsing results:
The result is that all the arguments are parsed as a single string, instead of being split to 3 different strings.
The text was updated successfully, but these errors were encountered: