esapiEncode

Encodes a given string for safe output in the specified context.

The encoding is meant to mitigate Cross Site Scripting (XSS) attacks.

Method Signature

esapiEncode(type=[string], value=[string])

Arguments

Argument
Type
Required
Description
Default

type

string

true

The type of encoding to use. Valid values are: "css", "dn", "html", "htmlAttribute", "javascript", "ldap", "sql", "url", "xml", "xmlAttribute", "xpath".

ortus.boxlang.runtime.validation.dynamic.ValueOneOf@4c7a078

value

string

false

The string to encode.

Examples

Last updated

Was this helpful?