Custom filter table: filter list header throws console error
Issue
In release 2019-1
if the custom filters table is empty, and one attempts to add a filter list header as the first filter (for example [abp]
), nothing happens in the UI. There are also no errors in the console.
If the filter list header is attempted to be added after the filter table already contains some filters, nothing happens in the UI and there is an error thrown in the console Uncaught TypeError: Error in invocation of i18n.getMessage(string messageName, optional any substitutions): No matching signature.
Reproduced in latest versions of Chrome, Opera and Firefox (did not try older browser versions)
Reproduction steps
- Open the Options page and navigate to the Advanced tab
- Make sure the custom filters table is empty
- Try adding the filter list header, for example [test]
--> notice that nothing happens in the UI
- Add any other, legit filter
- Try adding a filter list header again
--> notice that nothing happens in the UI, but this time there is an error in the console
Expected behavior
- there should be no errors in console
- trying to add a custom filter that has the format of a header should always trigger the
unexpected_filter_list_header
error message: 'Filter list headers aren't allowed here' (https://gitlab.com/eyeo/adblockplus/abpui/adblockplusui/blob/release-2019-1/locale/en_US/filter-validation.json#L46)
Other
Issue with error not being triggered if the filters header is trying to be added as the first filter is already present in release 2018-5
, see #386 (closed) for more info