Reputation: 9362
I have an attribute in my model which contains html string like below:
<p>Solution web de contrôle financier à chacune des étapes du cycle de soumission et de validation des dépenses. La gestion fortement paramétrable des workflows favorise son int& eacute;gration avec des applications tierces (pgm de gestion des dépenses) et son d& eacute;ploiement dans une organisation décentralisée.< /p>
As you can see we have some html chacacters like <p> &oirc;
...
I would like to be able to get this string with all special characters decoded. How can I do?
So this line: <p>Solution web de contrôle</p>
Should give me: Solution web de contrôle
Upvotes: 0
Views: 1391
Reputation: 499392
string decoded = HttpUtility.HtlmDecode("<p>Solution web de contrôle</p>");
This will take care of the character entities (ô
), but you will still need to strip out the HTML tags.
Upvotes: 0