}
private GadgetRewriter createRewriter(Set<String> tags, Set<String> attributes) {
Set<String> newTags = new HashSet<String>(tags);
newTags.addAll(DEFAULT_TAGS);
ContentRewriterFeatureFactory rewriterFeatureFactory =
new ContentRewriterFeatureFactory(null, ".*", "", "HTTP", "embed,img,script,link,style", "false");
return new SanitizingGadgetRewriter(newTags, attributes, rewriterFeatureFactory,
new CajaCssSanitizer(new CajaCssParser()), new DefaultSanitizingProxyingLinkRewriterFactory(rewriterUris));
}