Posted on: 5/14/2014 2:03:26 AM | Views : 613

Hi,
I need some help with using GetSafeHtmlFragment() that comes with AntiXss.
I'm commiting entries made by users into the database after running them through GetSafeHtmlFragment(). I've noticed that GetSafeHtmlFragment() method encodes double quotes and removes carriage returns.
So, if a user enters:
Today was my "first day" at work
the double quotes get encoded and when I display that entry on my page (in my MVC 5) app, I see
Today was my "first day" at work
Obviously, I don't want user's entry to look like that but I also don't want to compromise security. What is the right way of handling user entries using GetSafeHtmlFragment()?

Go to the complete details ...