Example usage for Java com.liferay.portal.kernel.util HtmlUtil fields, constructors, methods, implement or subclass
The text is from its open source code.
String | escape(String text) Escapes the text so that it is safe to use in an HTML context. |
String | escape(String text, int mode) Escapes the input text as a hexadecimal value, based on the mode (type). |
String | escapeAttribute(String attribute) Escapes the attribute value so that it is safe to use as an attribute value. |
String | escapeHREF(String href) Escapes the HREF attribute so that it is safe to use as an HREF attribute. |
String | escapeJS(String js) Escapes the JavaScript value so that it is safe to use in a JavaScript context. |
String | escapeURL(String url) Escapes the URL value so that it is safe to use as a URL. |
String | escapeXPathAttribute(String xPathAttribute) |
String | extractText(String html) Extracts the raw text from the HTML input, compressing its whitespace and removing all attributes, scripts, and styles. |
Html | getHtml() |
String | render(String html) Renders the HTML content into text. |
String | replaceNewLine(String html) Replaces all new lines or carriage returns with the HTML tag. |
void | setHtml(Html html) |
String | stripBetween(String text, String tag) Strips all content delimited by the tag out of the text. |
String | stripComments(String text) Strips all XML comments out of the text. |
String | stripHtml(String text) |
String | unescape(String text) |