jhy/jsoup — Issue #152: removeTags
Author: jja
Created: 2011-12-05 20:00:45+00:00
State: open

Can you add a removeTags() method to Whitelist?
For example, I might want Whitelist.basic but without the 'a' tag. Because tagNames is private and TagName is package-private, I can't add the method to a subclass. So I have to cut and paste code from Whitelist.

public Whitelist removeTags(String... tags) {
{
Validate.notNull(tags);

for (String tagName : tags) {
Validate.notEmpty(tagName);
tagNames.remove(TagName.valueOf(tagName));
}
return this;
}