Package ortus.boxlang.modules.esapi.util
Class AntiSamyUtil
java.lang.Object
ortus.boxlang.modules.esapi.util.AntiSamyUtil
Utility class for AntiSamy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDefault policystatic final ortus.boxlang.runtime.types.IStructAvailable Policies in the AntiSamy library -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.owasp.validator.html.PolicyloadPolicy(String policy) Load the policy from the AntiSamy library or a custom onestatic voidvalidatePolicy(String policy) Validate that the incoming policy is not a local one or a file
-
Field Details
-
DEFAULT_POLICY
Default policy- See Also:
-
POLICIES
public static final ortus.boxlang.runtime.types.IStruct POLICIESAvailable Policies in the AntiSamy library
-
-
Constructor Details
-
AntiSamyUtil
public AntiSamyUtil()
-
-
Method Details
-
validatePolicy
Validate that the incoming policy is not a local one or a file- Parameters:
policy- The policy to validate- Throws:
ortus.boxlang.runtime.types.exceptions.BoxRuntimeException- If the policy is invalid
-
loadPolicy
Load the policy from the AntiSamy library or a custom one- Parameters:
policy- The policy to load- Returns:
- The policy
-