开发者

asp.net mvc htmlencode trim after :

开发者 https://www.devze.com 2023-02-09 13:16 出处:网络
i am encoding in my controller when saving record. The thing is that开发者_C百科 when i enter this record abcccc:abcccc , the thing after : will be trimmed. it is working fine with other characters bu

i am encoding in my controller when saving record. The thing is that开发者_C百科 when i enter this record abcccc:abcccc , the thing after : will be trimmed. it is working fine with other characters but : it is trimming after that . what might be the problem? The records are saved after doing Server.htmlencode


Server.HtmlEncode("abcccc:abcccc") returns "abcccc:abcccc" as there is nothing to encode.

I suspect the problem is somewhere else. Have you tried debugging the code?

PS. Why are you Html encoding data in the database in the first place?

0

精彩评论

暂无评论...
验证码 换一张
取 消