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!
use HttpUtility Class to decode it as :
String myDecodedString = HttpUtility.HtmlDecode("Html encoded String here");
Follow this MSDN article
您正在寻找的是Regex.Unescape
var decodedString = Regex.Unescape(yourString);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.