/** * Escapes the JavaScript value so that it is safe to use in a JavaScript * context. * * @param js the JavaScript value to escape * @return the escaped JavaScript value, or <code>null</code> if the * JavaScript value is <code>null</code> */ public static String escapeJS(String js) { return getHtml().escapeJS(js); }
/** * Escapes the input text as a hexadecimal value, based on the mode (type). * * @param text the text to escape * @param mode the encoding type * @return the escaped hexadecimal value of the input text, based on the * mode, or <code>null</code> if the text is <code>null</code> * @see com.liferay.portal.util.HtmlImpl#escape(String, int) */ public static String escape(String text, int mode) { return getHtml().escape(text, mode); }
/** * Escapes the HREF attribute so that it is safe to use as an HREF * attribute. * * @param href the HREF attribute to escape * @return the escaped HREF attribute, or <code>null</code> if the HREF * attribute is <code>null</code> */ public static String escapeHREF(String href) { return getHtml().escapeHREF(href); }
/** * Escapes the attribute value so that it is safe to use as an attribute * value. * * @param attribute the attribute to escape * @return the escaped attribute value, or <code>null</code> if the * attribute value is <code>null</code> */ public static String escapeAttribute(String attribute) { return getHtml().escapeAttribute(attribute); }
/** * Escapes the CSS value so that it is safe to use in a CSS context. * * @param css the CSS value to escape * @return the escaped CSS value, or <code>null</code> if the CSS value is * <code>null</code> */ public static String escapeCSS(String css) { return getHtml().escapeCSS(css); }
/** * Escapes the URL value so that it is safe to use as a URL. * * @param url the URL value to escape * @return the escaped URL value, or <code>null</code> if the URL value is * <code>null</code> */ public static String escapeURL(String url) { return getHtml().escapeURL(url); }
/** * Escapes the text so that it is safe to use in an HTML context. * * @param text the text to escape * @return the escaped HTML text, or <code>null</code> if the text is * <code>null</code> */ public static String escape(String text) { return getHtml().escape(text); }
/** * Replaces all new lines or carriage returns with the <code><br /></code> * HTML tag. * * @param html the text * @return the converted text, or <code>null</code> if the HTML text is * <code>null</code> */ public static String replaceNewLine(String html) { return getHtml().replaceNewLine(html); }
/** * Strips all XML comments out of the text. * * @param text the text * @return the text, without the stripped XML comments, or <code>null</code> * if the text is <code>null</code> */ public static String stripComments(String text) { return getHtml().stripComments(text); }
public static String buildData(Map<String, Object> data) { return getHtml().buildData(data); }
/** * Replaces all Microsoft® Word Unicode characters with plain HTML * entities or characters. * * @param text the text * @return the converted text, or <code>null</code> if the text is * <code>null</code> * @deprecated As of Wilberforce (7.0.x), with no direct replacement */ @Deprecated public static String replaceMsWordCharacters(String text) { return getHtml().replaceMsWordCharacters(text); }
public static String escapeXPath(String xPath) { return getHtml().escapeXPath(xPath); }
public static String escapeXPathAttribute(String xPathAttribute) { return getHtml().escapeXPathAttribute(xPathAttribute); }
public static String getAUICompatibleId(String html) { return getHtml().getAUICompatibleId(html); }
public static String escapeJSLink(String link) { return getHtml().escapeJSLink(link); }
public static String fromInputSafe(String text) { return getHtml().fromInputSafe(text); }
public static String wordBreak(String text, int columns) { return getHtml().wordBreak(text, columns); }
public static String stripHtml(String text) { return getHtml().stripHtml(text); }
public static String unescape(String text) { return getHtml().unescape(text); }
public static String unescapeCDATA(String text) { return getHtml().unescapeCDATA(text); }