Java HTML htmlFilterToEmpty(String value)

Here you can find the source of htmlFilterToEmpty(String value)

Description

html Filter To Empty

License

Open Source License

Declaration

public static String htmlFilterToEmpty(String value) 

Method Source Code

//package com.java2s;

public class Main {

    public static String htmlFilterToEmpty(String value) {
        if (value == null || value.length() == 0) {
            return "";
        }/*w  ww. j  av  a2  s.co  m*/

        return value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll("\"",
                "&quot;");
    }
}

Related

  1. HTMLEnc(String s)
  2. htmlEnclose(String html)
  3. htmlFilenameForClass(Class c)
  4. HTMLFilter(String the_txt)
  5. htmlFilter(String value)
  6. htmlFooter()
  7. htmlFormat(String input)
  8. htmlFormatText(String line1, String line2)
  9. htmlHashTag(final String tagName)