[英]HttpUtility.UrlEncode not encoding single quotes
I'm trying to encode a query string using the HttpUtility.UrlEncode
method 我正在尝试使用HttpUtility.UrlEncode
方法对查询字符串进行编码
The string is: 字符串是:
www.example.come?a=1&b='mia'&c=33
the output is: 输出为:
www.example.come%3fa%3d1%26b%3d'mia'%26c%3d33
Why did the quotation marks not get encoded and is there a way for me to ensure that they do? 为什么引号没有被编码,我有办法确保它们被编码吗?
根据此 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~:/?#[]@!$&'()*+,;=
这些字符对于URL有效ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~:/?#[]@!$&'()*+,;=
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.