HTML escaped characters

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In regular expressions, the Regex.Escape() and Regex.Unescape() methods convert between plain text and text with escape characters

My question is simple. In HTML &lt;, & gt;, etc are escape characters that represent < and > respectively. Are there methods in .NET that convert between plain text and escaped text?
 
You could search htmlentities's like

Bismark

genojoe said:
In regular expressions, the Regex.Escape() and Regex.Unescape() methods
convert between plain text and text with escape characters.
My question is simple. In HTML &lt;, & gt;, etc are escape characters
that represent < and > respectively. Are there methods in .NET that convert
between plain text and escaped text?
 
genojoe said:
In regular expressions, the Regex.Escape() and Regex.Unescape() methods
convert between plain text and text with escape characters.
My question is simple. In HTML &lt;, & gt;, etc are escape characters
that represent < and > respectively. Are there methods in .NET that convert
between plain text and escaped text?

You might want to look at the System.Web.HttpUtility class. It has methods
for Html encoding and decoding (as well as for URL encoding/decoding).
 
Back
Top