public class HTMLParameterValueFilter extends BeanSupport implements ParameterValueFilter
| Constructor and Description |
|---|
HTMLParameterValueFilter() |
| Modifier and Type | Method and Description |
|---|---|
String |
filter(String key,
String value,
boolean isHtml)
过滤指定值,如果返回
null表示忽略该值。 |
Map<String,Set<String>> |
getAllowed() |
String[] |
getAllowedEntities() |
String[] |
getAllowedProtocols() |
String[] |
getDeniedTags() |
HTMLInputFilter |
getFilter() |
String[] |
getNeedClosingTags() |
String[] |
getProtocolAtts() |
String[] |
getRemoveBlanks() |
String[] |
getSelfClosingTags() |
protected void |
init()
初始化bean。
|
boolean |
isFiltering(javax.servlet.http.HttpServletRequest request)
是否需要过滤,如果返回否,则对于该请求的所有参数均不执行该过滤器。
|
void |
setAllowed(Map<String,Set<String>> allowed) |
void |
setAllowedEntities(String[] allowedEntities) |
void |
setAllowedProtocols(String[] allowedProtocols) |
void |
setDeniedTags(String[] deniedTags) |
void |
setFilter(HTMLInputFilter filter) |
void |
setNeedClosingTags(String[] needClosingTags) |
void |
setProtocolAtts(String[] protocolAtts) |
void |
setRemoveBlanks(String[] removeBlanks) |
void |
setSelfClosingTags(String[] selfClosingTags) |
afterPropertiesSet, assertInitialized, destroy, dispose, getBeanDescription, getBeanDescription, getBeanInterface, getBeanName, isInitialized, postDispose, postInit, preDispose, preInit, resolveBeanInterface, setBeanName, toStringprotected void init()
BeanSupportinit in class BeanSupportpublic boolean isFiltering(javax.servlet.http.HttpServletRequest request)
ParameterParserFilter有些filter可以根据URL来确定是否要过滤参数。
isFiltering in interface ParameterParserFilterpublic String filter(String key, String value, boolean isHtml)
ParameterValueFilternull表示忽略该值。
注意,value可能是null。
filter in interface ParameterValueFilterpublic HTMLInputFilter getFilter()
public void setFilter(HTMLInputFilter filter)
public String[] getDeniedTags()
public void setDeniedTags(String[] deniedTags)
public String[] getSelfClosingTags()
public void setSelfClosingTags(String[] selfClosingTags)
public String[] getNeedClosingTags()
public void setNeedClosingTags(String[] needClosingTags)
public String[] getAllowedProtocols()
public void setAllowedProtocols(String[] allowedProtocols)
public String[] getProtocolAtts()
public void setProtocolAtts(String[] protocolAtts)
public String[] getRemoveBlanks()
public void setRemoveBlanks(String[] removeBlanks)
public String[] getAllowedEntities()
public void setAllowedEntities(String[] allowedEntities)
Copyright © 2006–2018 TinyGroup. All rights reserved.