title: Javascript passing an encoded url to window.location.href
body: <p>I'd like to redirect a page with javascript using the following code:</p>
  
  <pre><code>    var s = 'http://blahblah/' + encodeURIComponent(something);
      alert(s);
      window.location.href = s;
  </code></pre>
  
  <p>The alert shows the correct encoded url but when I pass it to window.locaion.href, it redirects the page to the unencoded url which is wrong.
  How could I do it properly?
  Thanks</p>