Here you can find the source of textToHTML(String text)
public static String textToHTML(String text)
//package com.java2s; //License from project: Open Source License public class Main { public static String textToHTML(String text) { if (text == null) { return ""; }//from w w w.ja va 2s . c o m text = text.replace("\"", """).replace("\n", "<br>"); return text; } }