tidy.setIndentContent(false);
tidy.setSmartIndent(false);
tidy.setIndentAttributes(false);
tidy.setWraplen(0);
Document doc = tidy.parseDOM(in, null);
tidy.pprint(doc, out);
String tidied = new String(out.toByteArray());
return tidied.substring(tidied.indexOf("<body>")+"<body>".length(), tidied.indexOf("</body>")).trim();
} else {
return "";