escapejs
Hex encode characters for use in JavaScript strings.
def escapejs(
value: Any
) - > SafeString
Hex encode characters for use in JavaScript strings.
Parameters
| Name | Type | Description |
|---|---|---|
| value | Any | The content to be escaped, which will be converted to a string before processing. |
Returns
| Type | Description |
|---|---|
SafeString | A string with characters hex-encoded for safe inclusion in JavaScript string literals, marked as safe for HTML output. |