Hashtag Encodeuri
url = encodeURI(url);
url = url.replace(/#/g, '%23'); //you'll have to replace hash
Friendly Hawk
url = encodeURI(url);
url = url.replace(/#/g, '%23'); //you'll have to replace hash