Skip to main content
HTML_ESCAPE

Escapes HTML special characters in a text string

Updated over a year ago

Description

The ESCAPE_HTML() function is used to sanitize text by escaping HTML special characters, such as <, >, &, and others. This ensures that the text is displayed as-is in HTML documents without causing unintended formatting or rendering issues.

Syntax

ESCAPE_HTML(text)

Output

text

Variables

  1. text: The input text string that you want to escape HTML special characters from.

Example

ESCAPE_HTML(`text`)

ID

Description

ESCAPE_HTML

1

This is <strong>important</strong>.

This is &lt;strong&gt;important&lt;/strong&gt;.

2

<a href="#">Click here</a>

<a href="#">Click here</a>

3

<div>Hello</div>

&lt;div&gt;Hello&lt;/div&gt;

Did this answer your question?