• Welcome to Valhalla Legends Archive.
 

Attn: Spht

Started by Grok, October 14, 2003, 10:45 AM

Previous topic - Next topic

Grok

Spht, we should be using HTMLEncode for saving the news body to file.

This example accepts information entered by a user in a Web page and encodes it so that HTML characters are converted into a displayable, non-executable format. For example, it converts the string:

<A HREF="http://www.microsoft.com">Home</A>
into the string:

&lt;A HREF=&quot;http://www.microsoft.com&quot;&gt;Home&lt;/A&gt;
Example
Private Sub Button1_Click(ByVal sender As System.Object, _
       ByVal e As System.EventArgs) Handles Button1.Click
   Label1.Text = Server.HtmlEncode(TextBox1.Text)
End Sub

Spht

Done. I had that guy forgotten about.