I have a URL generated via form submission with passed variables. I won’t go into detail but the ‘+’ in the URL breaks the system, so I would like to replace it with ‘%2B’.
However, every method I have tried so far has not worked. I have tried the various PHP URL decode methods and none of them work, since they replace other characters in the URL which again breaks it.
The URL looks like this:
www.domain.com/catalog/search.php?sort_by=relevance&some_filter%5B%5D=filter+term
I have also tried getting the current page URL and using str_ireplace to replace the ‘+’ characters with regular spaces or ‘%2B’, all to no avail.
I would appreciate any help!
Thanks