Class HTMLUtil
- java.lang.Object
-
- ch.supertomcat.supertomcatutils.html.HTMLUtil
-
public final class HTMLUtil extends Object
Class which provides methods to escape, unescape HTML Strings or get the encoding from a HTML source
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringescapeHTML(String input)Escapes HTML Stringstatic StringgetEncodingFromSourceCode(String htmlCode)Returns the charset defined in meta http-equiv="Content-Type" tag if available otherwise an empty Stringstatic StringunescapeHTML(String input)Unescapes HTML String
-
-
-
Method Detail
-
getEncodingFromSourceCode
public static String getEncodingFromSourceCode(String htmlCode)
Returns the charset defined in meta http-equiv="Content-Type" tag if available otherwise an empty String- Parameters:
htmlCode- Page Source Code- Returns:
- Encoding or an empty String
-
escapeHTML
public static String escapeHTML(String input)
Escapes HTML String- Parameters:
input-- Returns:
- Escaped String
-
-