--- title: "htmlEscape" slug: "calc-function-html-escape" updated: 2026-05-12T12:48:23Z published: 2026-05-12T12:48:23Z canonical: "docs.lobstersoftware.com/calc-function-html-escape" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # htmlEscape > [!NOTE] > The $htmlEscape function converts HTML specific control characters so that they are no longer interpreted as HTML code. > > For example, a quotation mark (") is converted to *"*; and a lowercase character (<) is converted to *<*. > > If such a text is drawn as HTML (e.g. label element, grid cell), then these characters would be output as text instead of being interpreted by the browser as HTML. > > > [!TIP] > > Tooltip > > > > Syntax: *$htmlEscape(valueToEscape)* > > > > | Parameter | Description | > > | --- | --- | > > | `valueToEscape` | The text, which is after HTML control characters such as <,>,", etc. | > > > > Returns the passed text with coded HTML specific control characters. ## Syntax *$htmlEscape(valueToEscape)* ## Parameter | Name | Description | | --- | --- | | valueToEscape | The text that follows HTML control characters e.g. <,>,", etc. | ## Return value Returns the passed text with encoded HTML specific control characters. ## Example In a label element (which interprets and renders HTML) a text is to be output, which should not be interpreted as HTML. The text is "Please specify and !". The representation in a label element interpreted as HTML would now look like this: "Please specify!" Because and were interpreted by the browser as HTML markup tags and therefore no longer appear as text. This can be prevented by the following calculation expression. | $htmlEscape(Please specify and !) | | --- | The output on the screen is now as desired: "Please specify and !" Because the browser evaluates the following text "Please <from> and <to> specify!" and therefore finds no HTML markup.