Decode escaped Url without using HttpUtility.UrlDecode

前端 未结 8 1698
盖世英雄少女心
盖世英雄少女心 2020-12-05 09:52

Is there any function that converts an escaped Url string to its unescaped form? System.Web.HttpUtility.UrlDecode() can do that job but I don\'t want to add a r

相关标签:
8条回答
  • 2020-12-05 10:22

    If you are using .NET 4.0 or later, you can use WebUtility.UrlDecode which works with client profile and also correctly processes plus signs (see this discussion).

    0 讨论(0)
  • 2020-12-05 10:22

    The Microsoft ACE team have an extended (and better) version of decode, in the Anti-XSS library. However I'm not sure if it just passes through.

    (I don't see why you're that worried about the dependency on System.web.dll to be honest)

    0 讨论(0)
提交回复
热议问题