title: Javascript/jQuery encoding for special characters when using val()
body: <p>I have a problem with special characters like &amp;, ä, etc. and their corresponding HTML encoded writing like <code>&amp;amp;</code>, <code>&amp;auml;</code> etc.</p>
  
  <ul>
  <li><p>When they are used in the value tag of input fields, the browser decodes it automatically, no problem at all.</p></li>
  <li><p>When using jQuerys val() function, the browser has no chance to evaluate the content correctly</p>
  
  <pre><code>$("button").click(function(){
      $("#test").val("&amp;amp;");
  });
  </code></pre></li>
  </ul>
  
  <p>Any idea?</p>