node.js passing parameter via querystring
Problem
In a node.js application on the client side I have the following code in the button click event to call the node.js/express method "getProjectDetails" but because of the hash (#) character, Express is giving an error like "Unexpend end of input". So the question is how to escape the hash (#) character in the parameter query string that is passed to the node.js call?
// CLIENT SIDE CALLING CODE IN THE CLICK EVENT OF A BUTTON
window.location.href = rootURL + 'getProjectDetails?project=ABCD#EFGH BLAH BLAH';
Whereas the below works fine:
window.location.href = rootURL + 'getProjectDetails?project=ABCDEFGH BLAH BLAH';
Problem courtesy of: sskasim
Solution
You need to escape the hash by using %23 for #.
Solution courtesy of: Parker Hutchinson
Discussion
View additional discussion.