EscapeJavaScriptReference (Velocity 1.7 API)
Keywords: org.apache.velocity.app.event.implement.EscapeJavaScriptReference class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.velocity.app.event.implement
Class EscapeJavaScriptReference

    java.lang.Object
      org.apache.velocity.app.event.implement.EscapeReference
          org.apache.velocity.app.event.implement.EscapeJavaScriptReference

All Implemented Interfaces:
  EventHandler, ReferenceInsertionEventHandler, RuntimeServicesAware

public class EscapeJavaScriptReference
extends EscapeReference

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

Since:
  1.5
Author:
  wglass
See Also:
  StringEscapeUtils

Nested Class Summary

Nested classes inherited from class org.apache.velocity.app.event.ReferenceInsertionEventHandler
`ReferenceInsertionEventHandler.referenceInsertExecutor`

Constructor Summary
`EscapeJavaScriptReference()`

Method Summary
`protected String` | `escape(Object text)` Escapes the characters in a String to be suitable for use in JavaScript.
`protected String` | `getMatchAttribute()` Specify the configuration attribute that specifies the regular expression.

Methods inherited from class org.apache.velocity.app.event.implement.EscapeReference
`getRuntimeServices, referenceInsert, setRuntimeServices`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### EscapeJavaScriptReference

    public EscapeJavaScriptReference()

Method Detail

### escape

    protected String escape(Object text)

  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 String getMatchAttribute()

  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"

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2010 Apache Software Foundation. All Rights Reserved.