title: Input field cannot type other characters
body: <p>May I know what error cause my input field cannot type characters? Because after set <code>&gt;&lt;/\&quot;:*?|</code> these symbol restrict in the input field, other character cannot type in the input field.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;body&gt;
  
  &lt;h1&gt;Can't type character in the input field&lt;/h1&gt;
  
  
  &lt;input type="text" class="form-control blank" id="function_code" name="function_code" title="function_code" onpaste="return false"&gt;
  &lt;div id="error-box"&gt;&lt;/div&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  
  &lt;script&gt;
  
  function showError (key) {
    var errBox = document.querySelector("#error-box");
    errBox.textContent = "The character " + key.toString() + " is not allowed!";
    //Dismiss the error
    window.setTimeout(function () {
        errBox.textContent = "";
    }, 10000)
  }
  
  
  document.getElementById("function_code").onkeypress = function(e) {
  var chr = String.fromCharCode(e.which);
  
  if ("&gt;&lt;/\":*?|".indexOf(chr) &gt;= 0)
    showError(chr)
    return false;
  };
  &lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>Hope someone can help me solve this problem. Thanks.</p>