--- title: Jelly escaping types description: You use different methods when escaping characters in JavaScript and HTML. JavaScript uses the backslash character, and HTML uses the ampersand character.You can handle character escaping in Jelly files. XML escaping behavior can be modified only by users with the security\_admin role. locale: en-US canonical_url: https://www.servicenow.com/docs/r/australia/api-reference/scripts/r\_JellyEscapingTypes.html release: australia product: Scripts classification: scripts topic_type: reference last_updated: "2026-03-12" reading_time_minutes: 1 breadcrumb: [Jelly tags, Creating UI pages and macros, Scripting, API implementation, API implementation and reference] --- # Jelly escaping types You use different methods when escaping characters in JavaScript and HTML. JavaScript uses the backslash character, and HTML uses the ampersand character. **Note:** This functionality requires a knowledge of JavaScript, HTML, and Apache Jelly \(a Java and XML based scripting and processing engine for turning XML into executable code\). There are two different types of escaping that is required when generating output from Jelly: - JavaScript - HTML The escaping for each of these consists of the following types.
| Type | From | To |
|---|---|---|
| JavaScript | ' \(single quote\) | \\' |
| " \(double quote\) | \\" | |
| CR \(carriage return\) | \(blank\) | |
| NL \(newline\) | \\n \('\\' followed by 'n'\) | |
| HTML | & \(ampersand\) | & |
| < \(less than\) | < | |
| > \(greater than\) | > |