com.google.clearsilver.jsilver.functions.escape
Class JsValidateUnquotedLiteral
java.lang.Object
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JsValidateUnquotedLiteral
public JsValidateUnquotedLiteral()
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.