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

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

public class StyleEscapeFunction
extends Object
implements TextFilter

This function will be used to sanitize variables in 'style' attributes. It strips out any characters that are not part of a whitelist of safe characters. This replicates the autoescaping behavior of Clearsilver. It does not extend SimpleEscapingFunction because SimpleEscapingFunction requires a blacklist of characters to escape. The StyleAttrEscapeFunction instead applies a whitelist, and strips out any characters not in the whitelist.


Constructor Summary
StyleEscapeFunction(boolean isUnquoted)
          isUnquoted should be true if the function is escaping a string that will appear inside an unquoted style attribute.
 
Method Summary
 void dumpInfo()
           
 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

StyleEscapeFunction

public StyleEscapeFunction(boolean isUnquoted)
isUnquoted should be true if the function is escaping a string that will appear inside an unquoted style attribute.

Method Detail

filter

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

dumpInfo

public void dumpInfo()


Copyright © 2010-2012 Google. All Rights Reserved.