0
string testString = "a aa aaa aaaa aaaaa aaaaaa aaaaaaa aaaaaaaa aaaaaaaaa aaaaaaaaaa href=j&#97v&#97script:&#97lert 1  ClickMe";

I used the following code to decode it,

 string a = HttpUtility.HtmlDecode(testString);
 Console.WriteLine(a);

The output is still the same.

I have tried other options like HtmlAgilityPack.HtmlEntity.DeEntitize and HtmlDecode from other packages.

What am I missing?

Andrew Morton
  • 24,203
  • 9
  • 60
  • 84
Roger
  • 11
  • 1

0 Answers0