title: C# How to sanitize a string of XSS?
body: <p>What is the most reliable or well developed library in C# for sanitizing HTML data for XSS? I'd rather not use a full framework just to do this. Maybe a library isn't even needed? I'd rather not do my own regex implementation even if its copying and pasting regex that is proven to work, surely there's a library out there.</p>
  
  <p>PHP has <a href="http://php.net/manual/en/function.htmlspecialchars.php" rel="nofollow noreferrer">htmlspecialchars()</a> to prevent XSS, it is only used for output data without doing anything to stored data. Does C# have something like this?</p>