Java HTML Encode textToHTML(String text)

Here you can find the source of textToHTML(String text)

Description

text To HTML

License

Open Source License

Declaration

public static String textToHTML(String text) 

Method Source Code

//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("\"", "&quot;").replace("\n", "<br>");
        return text;
    }
}

Related

  1. textToHTML(String message)
  2. textToHtml(String s)
  3. textToHtml(String text)
  4. textToHTML(String text)
  5. textToHtml(String text)
  6. textToHTML(String text)
  7. toHtml(String message)
  8. toHTML(String msg)
  9. toHTML(String org, boolean inputValue)