In order to prevent XSS attacks, I am updating a page in which we have a text box that accepts HTML, stores it in the database, and retrieves and displays it later.
I understand that I can sanitize HTML using the AntiXSS.GetSafeHtmlFragment() method. As long as I do this before storing the HTML in the database, have I covered? Does anything need to be done when HTML is displayed on a web page?
Also, it seems like the whitelist is a black box. Is there any way to update this based on our requirements?
Nick
source share