@pengzhanbo/utils - v3.4.1
    Preparing search index...

    Function unescape

    • Converts the HTML entities &, <, >, ", and ' in str to their corresponding characters. It is the inverse of escape.

      str中的HTML实体&<>"'转换回对应的字符。 此操作是escape的逆向过程。

      Parameters

      • str: string

        The string to unescape. 要反转义的字符串

      Returns string

      The unescaped string. 反转义后的字符串

      unescape('&lt;script&gt;alert(1)&lt;/script&gt;') // => <script>alert(1)</script>