Class EscapeJavaScriptReference

  • All Implemented Interfaces:
    EventHandler, ReferenceInsertionEventHandler, RuntimeServicesAware

    @Deprecated
    public class EscapeJavaScriptReference
    extends EscapeReference
    Deprecated.
    impractical use

    Escapes the characters in a String to be suitable for use in JavaScript.

    Warning: escaping references this way, without knowing if they land inside or outside Javascript simple-quoted or double-quoted strings, is not usable in production.

    Since:
    1.5
    Author:
    wglass
    See Also:
    StringEscapeUtils
    • Constructor Detail

      • EscapeJavaScriptReference

        public EscapeJavaScriptReference()
        Deprecated.
    • Method Detail

      • escape

        protected java.lang.String escape​(java.lang.Object text)
        Deprecated.
        Escapes the characters in a String to be suitable for use in JavaScript.
        Specified by:
        escape in class EscapeReference
        Parameters:
        text -
        Returns:
        An escaped String.
        See Also:
        StringEscapeUtils
      • getMatchAttribute

        protected java.lang.String getMatchAttribute()
        Deprecated.
        Description copied from class: EscapeReference
        Specify the configuration attribute that specifies the regular expression. Ideally should be in a form
        eventhandler.escape.XYZ.match

        where XYZ is the type of escaping being done.

        Specified by:
        getMatchAttribute in class EscapeReference
        Returns:
        attribute "eventhandler.escape.javascript.match"