# Dangerous Input Text

**URL:** <https://forum.kirupa.com/t/dangerous-input-text/318251>\
**Category:** flash\
**Created:** [January 14, 2011, 2:03pm UTC](https://forum.kirupa.com/t/dangerous-input-text/318251 "2011-01-14T14:03:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![m2244](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@m2244](https://forum.kirupa.com/u/m2244)\
**Post date:** [January 14, 2011, 2:03pm UTC](https://forum.kirupa.com/t/dangerous-input-text/318251/1 "2011-01-14T14:03:19Z")

</div>

Hello,

I am making an interactive that takes text input and displays things based on that input. What I need help with is handling special characters. For instance if a user tries to input a semi-colon ‘;’ I want to catch it RIGHT WHEN THEY DO IT and not allow it so that a user can’t inject malicious code.

```auto

if (evt.keyCode == )//Semicolon
 {
  remove the character from the input textfield before they can hit the enter key.
 }

```
