Disable html rendering

S

Shabam

I'mallowing users to put in optional text in a form, which will be sent to
other users. However I'd like to prevent this text from rendering to html.
I remember there was a html tag that can do this. Can someone tell me what
it is? I don't think it's [pre], but not sure.
 
D

David Dorward

Shabam said:
I'mallowing users to put in optional text in a form, which will be sent to
other users. However I'd like to prevent this text from rendering to
html.

Convert & characters to &amp;, < characters to &lt; and > characters to
&gt;. This is trivial in pretty much any language you might be processing
the form data with.
 
S

Safalra

Shabam said:
I'mallowing users to put in optional text in a form, which will be sent to
other users. However I'd like to prevent this text from rendering to html.
I remember there was a html tag that can do this. Can someone tell me what
it is? I don't think it's [pre], but not sure.

You're thinking of <plaintext>. Don't use it though - it's the work of
the devil (or TBL when he was briefly possessed by the devil). David
Dorward's reply gives you the right answer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,188
Latest member
Crypto TaxSoftware

Latest Threads

Top