I want to know how to handle executable scripts in a textbox / ckeditor / any input control.
For example, if I enter:
<script>alert('hi')</script>
How should I handle this script in the textbox / ckeditor / input control?
I want to know how to handle executable scripts in a textbox / ckeditor / any input control.
For example, if I enter:
<script>alert('hi')</script>
How should I handle this script in the textbox / ckeditor / input control?
If you use Visual Studio 2010 you'd better create text box with HtmlHelper (Note using <%:
):
<%: Html.TextBox("name") %>
it will prevent you from JavaScript injection.