Converts the HTML entities &, <, >, ", and ' in str to their corresponding characters. It is the inverse of escape.
&
<
>
"
'
str
escape
将str中的HTML实体&、<、>、"和'转换回对应的字符。 此操作是escape的逆向过程。
The string to unescape. 要反转义的字符串
The unescaped string. 反转义后的字符串
unescape('<script>alert(1)</script>') // => <script>alert(1)</script> Copy
unescape('<script>alert(1)</script>') // => <script>alert(1)</script>
Converts the HTML entities
&,<,>,", and'instrto their corresponding characters. It is the inverse ofescape.将
str中的HTML实体&、<、>、"和'转换回对应的字符。 此操作是escape的逆向过程。