Class HtmlUtils

java.lang.Object
com.axelor.common.HtmlUtils

public class HtmlUtils extends Object
This class provides some helper methods escaping, rendering, replacing HTML text
  • Constructor Details

    • HtmlUtils

      public HtmlUtils()
  • Method Details

    • escape

      public static String escape(String text)
      Escapes the text. It is safe to use in an HTML context.
      Parameters:
      text - the text to escape
      Returns:
      the escaped HTML text, or null if the text is null
    • escapeAttribute

      public static String escapeAttribute(String attribute)
      Escapes the attribute value. It is safe to be use in an attribute value.
      Parameters:
      attribute - the attribute to escape
      Returns:
      the escaped attribute value, or null if the attribute value is null