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

Re: How to unescape HTML string by Herfried

Herfried
Sat Aug 12 14:17:52 CDT 2006

"Sebastian Mark" <REMOMEsaint@terian.net> schrieb:
>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-&amp;quot;Partner w/ Deloitte &amp;amp;
> have
> the oppty to become a Partner&amp;quot;"
>
> and I want to have
>
> "Siebel Analytics Sr Consultant- Partner w/ Deloitte & have the oppty to
> become a Partner"

Try 'HttpUtility.HtmlDecode'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>


Re: How to unescape HTML string by AMercer

AMercer
Sat Aug 12 17:36:01 CDT 2006

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


Re: How to unescape HTML string by Larry

Larry
Mon Aug 14 05:42:57 CDT 2006

AMercer wrote:
>> 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.
>

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

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


--
Larry Lard
larrylard@googlemail.com
The address is real, but unread - please reply to the group
For VB and C# questions - tell us which version