html.escape
html.escape
Function
Escape HTML special characters.
Syntax
html(text).escape()
Parameters
None.
Return value
| Type | Description |
|---|---|
| String | Escaped HTML text. |
Code Example
result = html('<p>BT & "Web"</p>').escape() // Output: <p>BT & "Web"</p> print result
Notes
-
&,<,>,", and'are escaped.