jhy/jsoup — pull request #316 by Shepard (2013-04-15 12:59:15+00:00)
Title: Made test method for attribute protected so it can be overridden

The release notes for 1.7.2 made me hopeful: "Allow Whitelist test methods to be extended" - however only the test method for tags was made protected (relating to Issue #85), not the test method for attributes.

My use case is that I want to extend the Whitelist so that I can filter the contents of the attributes (only allow certain values for attributes, only allow certain CSS styles in the "style" attribute). If this test method was protected as in my pull request I would only have to override this method to make it all happen out of the box. Without it I will have to write my own Cleaner as well that traverses the Document again after the regular cleaner to check the attribute values.