org.springframework.web.util

Class JavaScriptUtils

  • java.lang.Object
    • org.springframework.web.util.JavaScriptUtils


  • public abstract class JavaScriptUtils
    extends java.lang.Object
    Utility class for JavaScript escaping. Escapes based on the JavaScript 1.5 recommendation.

    Reference: JavaScript Guide on Mozilla Developer Network.

    Since:
    1.1.1
    Author:
    Juergen Hoeller, Rob Harrop, Rossen Stoyanchev
    • Constructor Summary

      Constructors 
      Constructor and Description
      JavaScriptUtils() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.lang.String javaScriptEscape(java.lang.String input)
      Turn JavaScript special characters into escaped characters.
      • Methods inherited from class java.lang.Object

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

      • JavaScriptUtils

        public JavaScriptUtils()
    • Method Detail

      • javaScriptEscape

        public static java.lang.String javaScriptEscape(java.lang.String input)
        Turn JavaScript special characters into escaped characters.
        Parameters:
        input - the input string
        Returns:
        the string with escaped characters