title: redirect to url taken from json response
body: <p>I am using jquery ajax method to make http request to php webpage, and in response I am taking json like {"status":"success","url":"http url"}</p>
  
  <p>on success function I am redirecting to url from json but most of the time it fails. I am using following to redirect:</p>
  
  <pre><code>window.location.href = url
  </code></pre>
  
  <p>It works fine when url is clean with no other characters, but fails when I have # or space or some other characters. Please letme know if there is any way to solve my problem.</p>