HttpUtility.HtmlEncode doesn't encode everything

后端 未结 7 946
南方客
南方客 2020-12-16 13:45

I am interacting with a web server using a desktop client program in C# and .Net 3.5. I am using Fiddler to see what traffic the web browser sends, and emulate that. Sadly t

7条回答
  •  -上瘾入骨i
    2020-12-16 14:16

    It seems like HtmlEncode is just for encoding strings that are put into HTML documents, where only / < > & etc. cause problems. For URL's, just replace HtmlEncode with UrlEncode.

提交回复
热议问题