Edit in JSFiddle

var str = "Thyme&time=again";

console.debug(str);
console.debug(encodeURIComponent(str));