How to unescape HTML string

  • Thread starter Thread starter Sebastian Mark
  • Start date Start date
S

Sebastian Mark

I have a simple question, is there an easy way in .NET
to unescape HTML characters?
for example I have a string

"Siebel Analytics Sr Consultant-"Partner w/ Deloitte & have
the oppty to become a Partner""

and I want to have

"Siebel Analytics Sr Consultant- Partner w/ Deloitte & have the oppty to
become a Partner"

Thank You
 
Sebastian Mark said:
I have a simple question, is there an easy way in .NET
to unescape HTML characters?
for example I have a string

"Siebel Analytics Sr Consultant-"Partner w/ Deloitte &
have
the oppty to become a Partner""

and I want to have

"Siebel Analytics Sr Consultant- Partner w/ Deloitte & have the oppty to
become a Partner"

Try 'HttpUtility.HtmlDecode'.
 
Try 'HttpUtility.HtmlDecode'.

Is there a specification somewhere of exactly what HtmlDecode does? The
documentatation is vague and cites some examples (space, lt, gt). I would
like to know exactly what it does.
 
AMercer said:
Is there a specification somewhere of exactly what HtmlDecode does? The
documentatation is vague and cites some examples (space, lt, gt). I would
like to know exactly what it does.

Probably, but I couldn't find it, so I just got Reflector to tell me
what HtmlEncode does:

- characters after > are encoded to
- " < > & are encoded to &quot; &lt; &gt; &amp; respectively
- that seems to be it
 

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