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).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top