title: MalformedURLException although I have already replaced spaces with %20
body: <pre><code>String url = "http://maps.googleapis.com/maps/api/distancematrix/xml?origins="+origin+"&amp;destinations="+destination+"&amp;mode=driving&amp;sensor=false&amp;language=en-EN&amp;units=imperial";
  url = url.replaceAll(" ", "%20");
  </code></pre>
  
  <p>Output : </p>
  
  <pre class="lang-none prettyprint-override"><code>http://maps.googleapis.com/maps/api/distancematrix/xml?origins=150%20Sutter%20St%20San%20Francisco,%20CA,%20United%20States&amp;destinations=1%20Palmer%20Sq%20E
  Princeton,%20NJ%2008542&amp;mode=driving&amp;sensor=false&amp;language=en-EN&amp;units=imperial
  </code></pre>
  
  <p>But I am getting an error saying : </p>
  
  <pre><code>java.net.MalformedURLException: Illegal character in URL
  </code></pre>
  
  <p>Can some one help me out ..</p>