HTML Encoding

by May 8, 2017

There is a static .NET method that you can use to HTML-encode text, for example if you want the text to display correctly in HTML output:

 
PS>  [System.Web.HttpUtility]::HtmlEncode('Österreich heißt so.')
Österreich heißt so.
  

Twitter This Tip! ReTweet this Tip!