title: Decoding '%40' back to '@' using jquery to populate input fields
body: <p>So I have this jquery script (thanks to a previous member right here) that takes the email or any other query string from the url and populates the value of the respective input fields on the page...</p>
  
  <p>So... the form input is something like:</p>
  
  <pre><code>&lt;input type="text" name="email" &gt;
  </code></pre>
  
  <p>And the script is...</p>
  
  <pre><code>$(function () {
  
  //grabs the entire query string
  var query = document.location.search.replace('?', '');
  
  //extracts each field/value pair
  query = query.split('&amp;');
  
  //runs through each pair
  for (var i = 0; i &lt; query.length; i++) {
  
    //splits up the field/value pair into an array
    var field = query[i].split("=");
  
    //targets the field and assign its value
    $("input[name='" + field[0] + "'], select[name='" + field[0] + "']").val(field[1]);
  
  }
  </code></pre>
  
  <p><strong>THE PROBLEM:</strong>
  The url is encoded like this...</p>
  
  <pre><code>http://www.example.com/?email=some%40email.com
  </code></pre>
  
  <p>So in my code, how can I decode the '%40' back to '@' <strong>before</strong> it populates the values in the input fields? Any guidance?</p>