Java HTML Encode toHtml(String trace)

Here you can find the source of toHtml(String trace)

Description

to Html

License

Open Source License

Declaration

private static String toHtml(String trace) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    private static String toHtml(String trace) {
        return trace.replaceAll("&", "&quot;").replaceAll("<", "&lt;").replaceAll(">", "&gt;")
                .replaceAll("\"", "&quot;").replaceAll("\t", "&nbsp; &nbsp; ");
    }//from   www .j  av  a  2  s  .  c  om
}

Related

  1. toHtml(String str)
  2. toHtml(String str)
  3. toHTML(String string)
  4. toHTML(String text)
  5. toHtml(String text)
  6. toHtml(String txt)
  7. toHtml(String value, String defaultValue)
  8. toHTML(String xhtml)
  9. toHtmlChars(String htmlReady)