> For the complete documentation index, see [llms.txt](https://community-test.logicnets.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://community-test.logicnets.com/release-9/platform-documentation/system-administration/security/html-data-escaping.md).

# HTML Data Escaping

## Introduction

When your application exchanges data between LogicNets and external systems using the ApplicationRunner web service, there are some considerations you should take into account to ensure the security of your application. This topic discusses them.

## LogicNets HTML-Unescapes Imported XML Element Values

LogicNets assumes that all element values are HTML-escaped, because the value could otherwise be interpreted as XML elements. LogicNets will unescape all values to obtain the actual intended value. This means that you need to take special care when using these values as displayed data on the frontend and in the model.

If the data needs to be displayed without being interpreted as HTML by the browser, you will need to double-escape the value. For example, this single-escaped value:

![](https://2802811211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdFhfexCjZ5JMhwGzzywq%2Fuploads%2Fgit-blob-61de2b912c3c8c7f87776024e2e012ade2fead37%2F00775f6a-8eed-43be-a567-49b67fd57115.png?alt=media)

will become the following in LogicNets:

![](https://2802811211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdFhfexCjZ5JMhwGzzywq%2Fuploads%2Fgit-blob-79dec02345fe3ef60355446489552096aa0c42ee%2F5d43755d-f53d-4a3b-9781-5360cb4b72aa.png?alt=media)

and it will be displayed as 'valid' HTML, hiding the div elements and activating the possible CSS styling. The value will display as Some Styled Text.

If the value should be displayed as a literal string that shows the div elements, you need to double-escape the value:

![](https://2802811211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdFhfexCjZ5JMhwGzzywq%2Fuploads%2Fgit-blob-17882f7aba803c35e0d30a8042c85b24a5944c5f%2Ff88a3cc1-ca9e-4a53-b49d-cda5c2ac6311.png?alt=media)

## LogicNets HTML-Escapes UI Values

LogicNets stores all values of regular inputs as HTML-escaped values. We do this to prevent displaying these values that might break or modify other HTML content. And we do it to prevent malicious code from being executed in the browser.

LogicNets' generic data exchange processing has no real knowledge about if the content should be escaped once or multiple times. This means that consuming systems that process these values need to know what the data is intended for or the modeling must take care to correctly escape values.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://community-test.logicnets.com/release-9/platform-documentation/system-administration/security/html-data-escaping.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
