title: Ajax load issues with space in url
body: <p>I have 2 python files: <strong>gui.py</strong> &amp; <strong>index.py</strong></p>
  
  <p><strong>python.py</strong> contains table with records from mysql database.</p>
  
  <p><strong>gui.py</strong> contains <strong>python.py</strong> and textfield with button to send messages.</p>
  
  <p>Also, <strong>gui.py</strong> contains javascript that will load new <strong>python.py</strong> with parameters.</p>
  
  <p><strong>gui.py script</strong></p>
  
  <pre><code>&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script&gt;
  $(document).ready(function(){
      $("#content").load("http://localhost/index.py");
      $("button").click(function(){
          var url = "http://localhost/index.py?name=1&amp;message=";
          var msg = document.getElementById("message").value;
          var res = url.concat(msg);
          alert(res); //here I always can understand that result URL is okay.
          $("#content").load(res);
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>And <strong>index.py part</strong></p>
  
  <pre><code>cursor.execute("INSERT INTO `messages` (`sender`, `receiver`, `text`, `time`) VALUES ('" + req.form['name'] + "', '3', '" + req.form['message'] + "', now())")
  });
  </code></pre>
  
  <p>Where <code>req</code> is from <code>def index(req):</code> <strong>I am using mod_python</strong>.</p>
  
  <p><strong>So, the problem is</strong> - when i try to send message with space is in - my table disappears (till next page refresh (but i don't need to refresh it without spaces, ajax load works good here)). And then I will see only the first word of the message. As you can see in my code, i have <code>alert(res);</code> if I copy that alert and just run that url - spaces works nicely.</p>
  
  <p><strong>Some details</strong></p>
  
  <p>I am using ubuntu 14.04, apache2, mod_python, python 2.7, mysql database, python-MySQLdb.</p>