querystring.unescape(str)


querystring.unescape() 方法在给定的 str 上执行网址百分比编码字符的解码。

¥The querystring.unescape() method performs decoding of URL percent-encoded characters on the given str.

querystring.unescape() 方法被 querystring.parse() 使用,通常不会被直接使用。导出它主要是为了允许应用代码在必要时通过将 querystring.unescape 分配给替代函数来提供替代的解码实现。

¥The querystring.unescape() method is used by querystring.parse() and is generally not expected to be used directly. It is exported primarily to allow application code to provide a replacement decoding implementation if necessary by assigning querystring.unescape to an alternative function.

默认情况下,querystring.unescape() 方法将尝试使用 JavaScript 内置的 decodeURIComponent() 方法进行解码。如果失败,则将使用更安全的不会因格式错误的网址而抛出错误的同类方法。

¥By default, the querystring.unescape() method will attempt to use the JavaScript built-in decodeURIComponent() method to decode. If that fails, a safer equivalent that does not throw on malformed URLs will be used.