Forums

This topic is locked

Disable html tags --- Please help

Posted 20 Jan 2002 20:03:53
1
has voted
20 Jan 2002 20:03:53 Moe Green posted:
i need to disable html tags in my classifieds.
how ?

Please Help

Replies

Replied 23 Jan 2002 11:49:05
23 Jan 2002 11:49:05 Joel Martinez replied:
well, the simplest way is to html encode the text from the database.. I don't remember if there is a server format for this, but if theres not, just do this:

<%= Server.HtmlEncode(RecordsetName.Fields("classified".value) %>

Joel Martinez [ ]
----------
E-Commerce Concepts with Ultradev...pre-order yours at
www.basic-ultradev.com/ecomm_concepts/
Replied 24 Jan 2002 01:05:53
24 Jan 2002 01:05:53 Moe Green replied:
where is that line goes?

Replied 24 Jan 2002 15:53:41
24 Jan 2002 15:53:41 Joel Martinez replied:
wherever you are printing out the text from the database... you need to make sure to change the items in bold to reflect the correct names in your code:

&lt;%= Server.HtmlEncode(<b>RecordsetName</b>.Fields("<b>classified</b>".value) %&gt;

Joel Martinez [ ]
----------
E-Commerce Concepts with Ultradev...pre-order yours at
www.basic-ultradev.com/ecomm_concepts/

Reply to this topic