Hi folks,
I have the following javascript.
window.location.href = _searchUrl + query.replace(/\s+/g, '+')
.replace('/', '-')
.replace('\\','-')
this replaces all spaces with +
and only the first \
and first /
with a -
.
i need to make it replace ALL \
and /
with a -
Any suggestions? or should this be URLEncoded?