I am trying to get a page title from page source of different pages. But lets say some pages have title like this:
"This is an example," ABC.
It has some html in it like “"”. If i use string in c# to get this title i get the whole thing and while displaying it displays it like above which is wrong. Is there any way to ignore or to take into account html values in c#?
I am also using htmlagilitypack so anything in that will do too.
You can use
WebUtility.HtmlDecodeto decode html, link on MSDN:just use:
The result will be: “\”This is an example,\” ABC.”
You also can use
HtmlEntity.DeEntitizeinHTML Agility Pack: