Edit in JSFiddle
JavaScript
Result
var str = "Thyme&time=again"; console.debug(str); console.debug(encodeURIComponent(str));