How to decode this html string using C#?

I have some string with javascript format string following :

\u003Cdiv>\u003Cdiv class=\"mbm detail_research\">\u003Cdiv class=\"clearfix\">\u003Ca class=\"_8o _8r lfloat\" href=\"http:\/\/www.abcm.com\/mutily\/post.php?id=2344324342\" 

Anyone know about how to decode it to normal html string using C#?

My mean that it will become to :

<div><div class="mbm detail_research"><div class="clearfix"><a class="_8o _8r lfloat" href="http://www.abcm.com/mutily/post.php?id=2344324342"

after decoded.

Thanks for your help!

Upvotes: 1

Views: 1463

Answers (2)

L.B
L.B

Reputation: 116098

What you are looking for is Regex.Unescape

var decodedString = Regex.Unescape(yourString);

Upvotes: 2

Usman
Usman

Reputation: 3278

use HttpUtility Class to decode it as :

String myDecodedString = HttpUtility.HtmlDecode("Html encoded String here");

Follow this MSDN article

Upvotes: 4

Related Questions