Angela wrote on 05 mrt 2004 in comp.lang.javascript
:
I have a text area and I want prevent people from entering HTML text
in the text area.
Someone putting "</textarea></tr><img
src="http://www.xxx.com/images/pic.gif">" in the textarea will
manipulate the page if the page was revisited.
only if you reenter that string from serverside,
so that asks for a serverside solution,
depending on your server language.
clientside it could be done by:
onchange=
"this.value=this.value.replace(/</g,"<")
[not tested]
but clientside JS could be manipulated by a client too.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)