Best practice for this:
- Save user input as it was entered into the system.
- HTML encodes all user input when it is displayed on any page
- " " "-" HTML, , .., .
HTML JavaScript .
, " ", , (PDF, , JavaScript, RSS ..), . . .
HTML Encoding System.Web.HttpUtility.HtmlEncode(...).
2 3, Microsoft AntiXSS. , HttpUtility , . , , GetSafeHtmlFragment(...), JavaScript . JavaScript, . , GetSafeHtmlFragment not GetSafeHtml, HTML-.
: AntiXss ( 2012 ), , , . , , . Microsoft .