Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table plus
applyColStyleToCelltrue
heading0
columnTypess,s,s,s
multiplefalse
columnAttributesstyle="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold,
enableSortingfalse

Syntax

escapeHtml(html)

Package

Alias

Pkg Usage

Description

Excerpt
hiddentrue
Escapes the given html removing traces of offending characters that could be wrongfully interpreted as markup.

Escapes the given html removing traces of offending characters that could be wrongfully interpreted as markup The following characters are reserved in HTML and must be replaced with their corresponding HTML entities:

  • "

...

  • is replaced

...

  • with "

  • &

...

  • is replaced

...

  • with &

  • <

...

  • is replaced

...

  • with &lt;

  • >

...

  • is replaced

...

  • with &gt;

Parameters

Table plus
applyColStyleToCelltrue
columnTypess,s,s,s
heading0
multiplefalse
enableSortingfalse

Parameter name

Type

Required

Description

html

...

String

Yes

HTML to escape.

Return

...

Type

String

Returns the html input escaped.

Example

Code Block
return escapeHtml("<html><script><img src=1 onerror=alert(1)></script></html>");

Returns :Returns "&lt;html&gt;&lt;script&gt;&lt;img src=1 onerror=alert(1)&gt;&lt;/script&gt;&lt;/html&gt;"

See also

...

Filter by label (Content by label)
showLabelsfalse
max25
showSpacefalse
cqllabel = "string_routines" and space = currentSpace ( )
labelsarray_routines