com.google.clearsilver.jsilver.functions.escape
Class JsValidateUnquotedLiteral

java.lang.Object
  extended by com.google.clearsilver.jsilver.functions.escape.JsValidateUnquotedLiteral
All Implemented Interfaces:
TextFilter

public class JsValidateUnquotedLiteral
extends Object
implements TextFilter

This function will be used to sanitize variables introduced into javascript that are not string literals. e.g. Currently it only accepts boolean and numeric literals. All other values are replaced with a 'null'. This behavior may be extended if required at a later time. This replicates the autoescaping behavior of Clearsilver.


Constructor Summary
JsValidateUnquotedLiteral()
           
 
Method Summary
 void filter(String in, Appendable out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsValidateUnquotedLiteral

public JsValidateUnquotedLiteral()
Method Detail

filter

public void filter(String in,
                   Appendable out)
            throws IOException
Specified by:
filter in interface TextFilter
Throws:
IOException


Copyright © 2010-2012 Google. All Rights Reserved.