adblockplus/adblockpluschrome — pull request #6 by evilseanbot (2014-05-31 22:44:04+00:00)
Title: Iss491

I've put together a system for checking custom typed filters for valid CSS selectors.

The solution I chose is a little hacky (checks whether the selector could be used with querySelectorAll and then whether the selector with a blank attribute could be inserted into a test document), but it seemed like the best solution in terms of covering a wide range of css errors while adding minimal size (most CSS parser libraries I looked up were around 100k)

The fix adds 20 tests to qunit, I've also compiled the code and tested all of the contained test examples in the actual chrome extension.