@Component public class AntiSamyStringCleaningService extends Object implements IStringCleaningService, org.springframework.beans.factory.InitializingBean
| Constructor and Description |
|---|
AntiSamyStringCleaningService() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
protected org.owasp.validator.html.AntiSamy |
getAntiSamyInstance()
Just returns a new AntiSamy instance.
|
String |
getSafeContent(String content)
Return a safe HTML string version of the provided content.
|
String |
getTextContent(String content)
Return a safe text string version of the provided content.
|
void |
setResource(org.springframework.core.io.Resource resource)
Set the resource to be used as the AntiSamy policy file.
|
void |
setTextOnlyPolicy(org.springframework.core.io.Resource resource)
Set the resource to be used as the AntiSamy policy file.
|
public void setResource(org.springframework.core.io.Resource resource)
resource - resource to usepublic void setTextOnlyPolicy(org.springframework.core.io.Resource resource)
resource - resource to usepublic void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionpublic String getSafeContent(String content)
IStringCleaningServicegetSafeContent in interface IStringCleaningServicecontent - content to cleanpublic String getTextContent(String content)
IStringCleaningServicegetTextContent in interface IStringCleaningServicecontent - content to cleanprotected org.owasp.validator.html.AntiSamy getAntiSamyInstance()
Copyright © 2015 Jasig. All Rights Reserved.