I'm attempting to parse out the html tags from a Java string and that is working fine using the below Jsoup parse method. The only thing is that when I call the .text method it removes the line breaks ("\n")
tags. I want to keep those but still have the method return a String, any ideas?
private static String stripHTML(String html) {
return Jsoup.parse(html).text();
}