@Component public class AntiSamyStringCleaningService extends java.lang.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.
|
java.lang.String |
getSafeContent(java.lang.String content)
Return a safe HTML string version of the provided content.
|
java.lang.String |
getTextContent(java.lang.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 java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanjava.lang.Exceptionpublic java.lang.String getSafeContent(java.lang.String content)
IStringCleaningServicegetSafeContent in interface IStringCleaningServicecontent - content to cleanpublic java.lang.String getTextContent(java.lang.String content)
IStringCleaningServicegetTextContent in interface IStringCleaningServicecontent - content to cleanprotected org.owasp.validator.html.AntiSamy getAntiSamyInstance()
Copyright © 2019 Jasig. All Rights Reserved.