---
sourceDocument: Australia API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/de-DE/api-reference

 Release :

    - australia

ft:locale :

    - de-DE

ft:publication_title :

    - Australia API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# Escaping types

# Jelly escaping types {#ariaid-title1}

* Freigeben Version: Australia
* 
* Aktualisiert 12. März 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 Minute Lesedauer

You use different methods when escaping characters in JavaScript and HTML. JavaScript
uses the backslash character, and HTML uses the ampersand character.
Hinweis:  
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.
{#r_JellyEscapingTypes__simpletable_j3d_w44_mq__entry__3}

| Type | From | To |
|-|-|-|
| JavaScript | ' (single quote) | \\' |
|   | " (double quote) | \\" |
|   | CR (carriage return) | (blank) |
|   | NL (newline) | \\n ('\\' followed by 'n') |
| HTML | \& (ampersand) | \&amp; |
|   | \< (less than) | \&lt; |
|   | \> (greater than) | \&gt; |
[Tabelle : 1. Jelly escaping types]

{#r_JellyEscapingTypes__simpletable_j3d_w44_mq}

You can also escape HTML using the getHTMLValue() function which will enforce all line
breaks and escape the characters mentioned above. It can be used as follows:  

    ${test.getHTMLValue()} 

## Add escaping to a Jelly replacement {#ariaid-title2}

You can handle character escaping in Jelly files. XML escaping behavior can be
modified only by users with the security_admin role.

### Warum und wann dieser Vorgang ausgeführt wird

Hinweis:  
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).

### Prozedur

Add a prefix to the `${expression}` or `$[expression]` indicating the escaping to be performed.  

    ${JS:expression}
    ${HTML:expression}

The prefix tells the system to take the result of the expression and escape it before outputting.

The escaping may be combined by specifying a comma-separated list of prefixes:  

    ${JS,HTML:expression} 


