I have an html textbox and am entering double quotes in the text box.
Eg
I "a a person
I am using the Javsacript escape function and it encodes the quote to %22
which is correct
To the last point before hitting the server I have %22
but when I get it at the server by Request as follows:
Request["myJson"].Trim();
The %22
is converted back to "
Please help
escape
, cause it is deprecated. Use similar function encodeURIComponent
. 如果要使用HttpContext.Current.Server.UrlEncode(Request["myJson"].Trim());
则可以在服务器端进行所有字符转义HttpContext.Current.Server.UrlEncode(Request["myJson"].Trim());
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.