maztt
maztt

Reputation: 12294

asp.net mvc htmlencode trim after :

i am encoding in my controller when saving record. The thing is that 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

Upvotes: 1

Views: 203

Answers (1)

Jakub Konecki
Jakub Konecki

Reputation: 46008

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?

Upvotes: 1

Related Questions