Java HTML Escape htmlEscape(String str)

Here you can find the source of htmlEscape(String str)

Description

html Escape

License

Open Source License

Declaration

public static String htmlEscape(String str) 

Method Source Code

//package com.java2s;
/*//from   ww  w  . j  a  va2s.  com
 * SK's Minecraft Launcher
 * Copyright (C) 2010-2014 Albert Pham <http://www.sk89q.com> and contributors
 * Please see LICENSE.txt for license information.
 */

public class Main {
    public static String htmlEscape(String str) {
        return str.replace(">", "&gt;").replace("<", "&lt;").replace("&", "&amp;");
    }
}

Related

  1. htmlEscape(String s)
  2. htmlescape(String s)
  3. htmlEscape(String source)
  4. htmlEscape(String str)
  5. htmlEscape(String str)
  6. htmlEscape(String string)
  7. htmlEscape(String tag)
  8. htmlEscape(String text)
  9. htmlescapeAll(String s1)