I am trying to HTML encode a string that contains alpha, beta, and gamma characters (α, β, γ
). Unfortunately, using the System.Web.HttpUtility.HtmlEncode is not encoding these characters. Is there some other function in the .NET library that would encode these to HTML?
I am trying to HTML encode a string that contains alpha, beta, and gamma
Share
Not aware of any built in tool for this, but you can use this handy function:
This will simply convert all characters in the string to HTML entities.