title: URL Encode a string in jQuery for an AJAX request
body: <p>I'm implementing Google's Instant Search in my application. I'd like to fire off HTTP requests as the user types in the text input. The only problem I'm having is that when the user gets to a space in between first and last names, the space is not encoded as a <code>+</code>, thus breaking the search. How can I either replace the space with a <code>+</code>, or just safely URL Encode the string?</p>
  
  <pre><code>$("#search").keypress(function(){       
      var query = "{% url accounts.views.instasearch  %}?q=" + $('#tags').val();
      var options = {};
      $("#results").html(ajax_load).load(query);
  });
  </code></pre>