Valhalla Legends Forums Archive | Web Development | Attn: Spht

AuthorMessageTime
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
October 14, 2003, 3:45 PM
Spht
Done. I had that guy forgotten about.
October 14, 2003, 5:59 PM

Search