List of utility methods to do HTML Encode
String | htmEncode(String input) htm Encode if (null == input || "".equals(input)) { return input; StringBuffer stringbuffer = new StringBuffer(); int j = input.length(); for (int i = 0; i < j; i++) { char c = input.charAt(i); switch (c) { ... |
String | htmlencode(String str) htmlencode if (str == null) { return null; return replace("\"", """, replace("<", "<", str)); |
String | replaceHTMLTags(final String source) replace HTML Tags String modified = new String(source); return modified.replace(" ", " ").replace("<", "<") .replace(">", ">").replace("&", "&") .replace(""", "\"").replace("\n", ""); |
String | encodeHtml(String to_encode) Encodes unicode characters as HTML entities return TextUtils.htmlEncode(to_encode);
|
Spanned | fromHTML(String textToTransform) from HTML return Html.fromHtml(textToTransform);
|
String | htmlEncode(String stringToEncode) html Encode if (stringToEncode == null) { return null; StringBuilder encodedString = new StringBuilder(); for (int i = 0; i < stringToEncode.length(); ++i) { final char ch = stringToEncode.charAt(i); if (Character.isLetterOrDigit(ch) || (ch == '.') || (ch == '~') || (ch == '-') || (ch == '_')) { ... |