Function: htmlEncode

htmlEncode(str): string

html字符编码

Parameters

Name Type Description
str string 需要编码的字符串

Returns

string

编码后的字符串

Example

htmlEncode('<script>');
// => &lt;script&gt;
ON THIS PAGE