We\'re using Jsoup.clean(String, Whitelist) to process some input, and it appears that Jsoup is adding an extraneous line break just prior to acceptable tags. I\'ve seen a f
I just downloaded Jsoup 1.7.1, in this version it's possible to use clean()-method with custom OutputSettings:
String html = "This is a line with bold text within it.";
OutputSettings settings = new OutputSettings();
settings.prettyPrint(false);
String clean = Jsoup.clean(html, "", Whitelist.relaxed(), settings);
Or shorter:
String clean = Jsoup.clean(html, "", Whitelist.relaxed(), new OutputSettings().prettyPrint(false));
(In fact its the same solution like posted in the comments)