logger.warn("Error rendering page " + uri.getPath(), e);
throw new IOException(e);
}
// Try to convert html to xhtml
HtmlCleaner cleaner = new HtmlCleaner();
CleanerProperties xhtmlProperties = cleaner.getProperties();
TagNode xhtmlNode = cleaner.clean(html);
if (xhtmlNode == null) {
logger.warn("Error creating well-formed document from page {}", resource);
return;
}