title: window.location.assign(varString) wont work
body: <p>I have java script function to check the URL and split it,
  I ask a question and depends on the answer it will forward the user page
  all works fine until I use window.location.assign();
  with string inside (=window.location.assign(path);) instead of fixed URL (=window.location.assign("<a href="http://stackoverflow.com">http://stackoverflow.com</a>");)
  what can i do?
  thanks...</p>
  
  <pre><code>var register=...;
  var login=...;
  function link(type) {
  var urlPath = document.URL.split("/");
  if (type == "register") {
      var path= urlPath[2] + register;
      window.location.assign(path);
  }
  else {
      var path = urlPath[2] + login;
      window.location.assign(path);
  
  }
  event.preventDefault();
  </code></pre>
  
  <p>}</p>