ESCAPE_HTML
Escapes HTML special characters in a text string
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
)
text
: The input text string that you want to escape HTML special characters from.
Example
Table
ID
Description
1
This is <strong>important</strong>.
2
<a href="#">Click here</a>
3
<div>Hello</div>
Function
ESCAPE_HTML(`Description`)
Results
ESCAPE_HTML (text)
This is &lt;strong&gt;important&lt;/strong&gt;.
&lt;a href=&quot;#&quot;&gt;Click here&lt;/a&gt;
&lt;div&gt;Hello&lt;/div&gt;
Last updated