We have found a serious bug whereby a content blocking rule list with a certain rule can stop Safari from being able to parse certain URLs. Specifically we found this to happen for Google text ad links which are supposed to redirect to the advertisement. Instead of the browser being redirected, Safari displays an error (see screenshot). This error goes away when the content blocking API is not used, and when it is used without certain troublesome rules.
Steps to Reproduce:
1. Create a new empty Safari Extension.
2. Create a file called rules.json containing the following:
safari.extension.setContentBlocker does not appear to work at all when passed a callback function except if the rules are first converted to JSON. If the rules are not converted to JSON the callback is performed twice, first with an empty string and then with an Error "Extension compilation failed: Failed to parse the JSON String.". Further calls to the function with anything but JSON also causes two callbacks first an empty string and then null.
If the callback is not passed, or if the rules are converted to JSON things seem to work as I expect.