It doesn't appear that the strings are being encoded.
Issue:
Dim encodedStr As String = HttpUtility.HtmlEncode("<p>This is a test</p>")
The output produces:
<p>This is a test</p>
Expected result:
<p>This is a test</p>
I'd double check to make sure whatever is displaying the value is indeed displaying it in text mode, and not HTML. Under the debugger, it works fine:
HttpUtility.HtmlEncode("<p>This is a test</p>");
"<p>This is a test</p>"
(Yes, this is C# but the .NET framework code is all shared and I was lazy)