enhtml(X;Z)

Returns an HTML-encoded version of the given string. (Available as of version 11.25)

Syntax

enhtml(X;Z)

Input

Argument Type Description
X text The string to encode

A scalar value or the name of a column

Z text A list of options that may be applied to the function

Currently, the only option you may specify for the Z parameter is:

'nobr'
When this option is specified, newlines (\n) are not translated into the HTML <BR> tag.

Z may be omitted.

Return Value

Returns an HTML-encoded version of X by escaping characters such as <, >, and &. For example, < is encoded as &lt;.

By default, newlines (\n) are translated into the HTML <BR> tag; this may be turned off by adding the option 'nobr' to the Z parameter.

Example

In the following example, enhtml(X;Z) is used to encode the string <hello&goodbye> as &lt;hello&amp;goodbye&gt;.

<table/>
<willbe name="enocoded_text" value="enhtml('<hello&goodbye>';)"/>