org.bibeault.frontman.utensils
Class JavascriptStringEncoder

java.lang.Object
  extended by org.bibeault.frontman.utensils.JavascriptStringEncoder

public class JavascriptStringEncoder
extends java.lang.Object


Constructor Summary
JavascriptStringEncoder()
           
 
Method Summary
static java.lang.String encode(java.lang.String source)
          Encodes a source string such that the special Javascript string characters ", ' and & are escaped to make it safe to sue the string within a Javascript string literal.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavascriptStringEncoder

public JavascriptStringEncoder()
Method Detail

encode

public static java.lang.String encode(java.lang.String source)

Encodes a source string such that the special Javascript string characters ", ' and & are escaped to make it safe to sue the string within a Javascript string literal.

Notes:

Parameters:
source - the source string to encode
Returns:
the resulting string after encoding