escape

Modified on Mon, 31 Jul 2023

Description

Convert the special characters in string to their corresponding HTML entities

Syntax

escape(text)

Parameters

Input ParameterTypeDescription
textstringThe string to escape.

Return value

Type
string

Sample

ExampleResultDescription
escape('fred, barney, & pebbles')'fred, barney, & pebbles'Escape & in the input text

To view all the String functions, click here.