apps-script-utils 2.1.1 Help

decodeHtml

function decodeHtml(value: string): string;

Decimal (<) and hexadecimal (<) references are decoded. Named entities are not: "&" comes back unchanged, because this is the inverse of encodeHtml, which only ever emits numeric references.

Parameters

Parameter

Type

Description

value

string

The string to convert. It must not be empty.

Returns

string — the decoded string.

Throws

Exception

Condition

EmptyStringException

the value is not a string, or is empty.

Examples

Converting

decodeHtml("&#60;a&#62;"); // => "<a>" decodeHtml("&amp;"); // => "&amp;"

See also

Source

src/html/decodeHtml.ts

23 September 2026

This documentation was generated with AI (Claude) from the library's source code.