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, new FakeContainerConfig());
return new SanitizingGadgetRewriter(newTags, attributes, rewriterFeatureFactory,
rewriterUris, new CajaCssSanitizer(new CajaCssParser()));
}