Package play.utils

Class HTML


  • public class HTML
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      HTML()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String htmlEscape​(java.lang.String input)
      Turn special characters into HTML character references.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HTML

        public HTML()
    • Method Detail

      • htmlEscape

        public static java.lang.String htmlEscape​(java.lang.String input)
        Turn special characters into HTML character references. Handles complete character set defined in HTML 4.01 recommendation.

        Escapes all special characters to their corresponding entity reference (e.g. <).

        Reference: http://www.w3.org/TR/html4/sgml/entities.html

        Parameters:
        input - the (unescaped) input string
        Returns:
        the escaped string