Java HTML Encode htmlEncoding(String str)

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

Description

html Encoding

License

Open Source License

Declaration

public static String htmlEncoding(String str) 

Method Source Code

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

public class Main {

    public static String htmlEncoding(String str) {
        StringBuffer bfu = new StringBuffer();
        if (str != null) {
            String s = "&#";
            char[] cs = str.toCharArray();
            for (char c : cs) {
                int it = c;
                bfu.append(s).append(it).append(";");
            }/*ww w  .  j a v a 2 s  .c o m*/
        }
        return bfu.toString();

    }
}

Related

  1. htmlEncode(String text)
  2. htmlEncode(String txt)
  3. htmlEncode(String txt)
  4. htmlEncoded(String text)
  5. htmlEncoder(String content)
  6. htmlEntityEncode(String s)
  7. htmlize(CharSequence q)
  8. htmlize(String str)
  9. htmlize(String text)