public class CajaCssSanitizer extends Object
| Constructor and Description |
|---|
CajaCssSanitizer(CajaCssParser parser) |
| Modifier and Type | Method and Description |
|---|---|
void |
sanitize(com.google.caja.parser.css.CssTree css,
Uri linkContext,
GadgetContext gadgetContext,
ProxyUriManager importRewriter,
ProxyUriManager imageRewriter)
Sanitize the given CSS tree in-place by removing all non-whitelisted function calls
|
void |
sanitize(Element styleElem,
Uri linkContext,
GadgetContext gadgetContext,
ProxyUriManager importRewriter,
ProxyUriManager imageRewriter)
Sanitize the CSS content of a style tag.
|
String |
sanitize(String content,
Uri linkContext,
GadgetContext gadgetContext,
ProxyUriManager importRewriter,
ProxyUriManager imageRewriter)
Sanitize the CSS content of a style tag.
|
@Inject public CajaCssSanitizer(CajaCssParser parser)
public String sanitize(String content, Uri linkContext, GadgetContext gadgetContext, ProxyUriManager importRewriter, ProxyUriManager imageRewriter)
content - to sanitizelinkContext - url of containing contentgadgetContext - The gadget context.importRewriter - to rewrite @imports to sanitizing proxyimageRewriter - to rewrite images to sanitizing proxypublic void sanitize(Element styleElem, Uri linkContext, GadgetContext gadgetContext, ProxyUriManager importRewriter, ProxyUriManager imageRewriter)
styleElem - to sanitizelinkContext - url of containing contentgadgetContext - The gadget context.importRewriter - to rewrite @imports to sanitizing proxyimageRewriter - to rewrite images to sanitizing proxypublic void sanitize(com.google.caja.parser.css.CssTree css,
Uri linkContext,
GadgetContext gadgetContext,
ProxyUriManager importRewriter,
ProxyUriManager imageRewriter)
css - DOM rootlinkContext - url of containing contentgadgetContext - The gadget context.importRewriter - to rewrite links to sanitizing proxyimageRewriter - to rewrite links to the sanitizing proxyCopyright © 2007-2012. All Rights Reserved.