title: Strange Behavior of window.location.hash Containing Dots / Periods
body: <p>Never seen this or could imagine. My URL looks similar to this:</p>
  
  <pre><code> www.site.com/root/path1/path2/123/some-path-1/page.1.2.html
  </code></pre>
  
  <p>At some point I update URL with hash so dynamic user interaction would reflect the URL address to send a link to a friend:</p>
  
  <pre><code> window.location.hash = 'key=SomeValue';
  </code></pre>
  
  <p>It works perfect for me almost in all cases, except when SomeValue contains dots:</p>
  
  <pre><code> window.location.hash = 'key=SomeValueA.B.';
  </code></pre>
  
  <p>With the above URL becomes:</p>
  
  <pre><code> www.site.com/root/path1/path2/123/some-path-1/key=SomeValueA.B.
  </code></pre>
  
  <p>instead of 
       www.site.com/root/path1/path2/123/some-path-1/page.1.2.html#key=SomeValueA.B.</p>
  
  <p>I cannot imagine what is wrong here and I cannot reproduce it in jsfiddle. I use the custom written hash manager class for this:</p>
  
  <pre><code>var hashUrlManager = function(){
   var getHash = function(){       
      return (window.location.hash) ? window.location.hash.substring(1) : "";
   };
   return{
      getHash : getHash,
      getParam : function(k){
          return Util.getParameter(k,"?"+getHash());
      },
      setParam : function(k,v){
          var h = getHash();
          var vNow = hashUrlManager.getParam(k);
          if(vNow==""){
              if(window.location.href.indexOf("#")==-1){
                  window.location.hash = k+"="+v;
              }else{
                  window.location.hash = h+((h=="")?"":"&amp;")+k+"="+v;
              }
          }else if(vNow!==v){
              window.location.hash = window.location.hash.replace(k+"="+vNow,k+"="+v);                
          }
      },
      removeParam : function(k){
          var v = hashUrlManager.getParam(k);
          var s = k+"="+v;
          if(window.location.hash.indexOf("&amp;"+s)!=-1)s="&amp;"+s;
          window.location.hash = window.location.hash.replace(s,"");
      }
   };
  }();
  
  hashUrlManager.setParam('key','SomeValueA.B.');
  </code></pre>
  
  <p>Note: I do use History.js, if that matters, and jQuery on the page.</p>