Phil
03-21-2000, 02:26 PM
I am validating a textarea form field, the results of which will
be subsequently returned to the browser. This presents serious
security problems since a user can submit javascript into a form
that will be executed when it is sent back to the browser.
What's the best way to prevent execution of JavaScript code submitted
through a form when the text is returned to the browser for confirmation?
For example, I need to suppress the following JavaScript:
<a href="someurl.asp" onMouseOver="alert('hello world')">here it
is</a>
I'd like the browser to display the JavaScript code as opposed to executing
it.
Phil
be subsequently returned to the browser. This presents serious
security problems since a user can submit javascript into a form
that will be executed when it is sent back to the browser.
What's the best way to prevent execution of JavaScript code submitted
through a form when the text is returned to the browser for confirmation?
For example, I need to suppress the following JavaScript:
<a href="someurl.asp" onMouseOver="alert('hello world')">here it
is</a>
I'd like the browser to display the JavaScript code as opposed to executing
it.
Phil