safe-redirect-manager
safe-redirect-manager copied to clipboard
Redirect to a url that includes square brackets []
Describe the bug We received the following from @tbenyon on WordPress.ORG:
When saving square brackets in the Redirect To field they get html encoded. For example, this:
/blog/?categories[]=*. . . get turned into this:/blog/?categories%5B%5D=*This redirect does not work as wanted. This happens with REGEX enabled or disabled.
I’ve tried escaping the brackets with \ but that didn’t work.
Thanks,
Tom
Steps to Reproduce
See above
Expected behavior
Screenshots
Environment information
- Device:
- OS:
- Browser and version:
- Plugins and version:
- Theme and version:
- Other installed plugin(s) and version(s):
Additional context
we have the same issue by using regex to match /. Escaping with \/ does not work. So basically Regex not working properly. Any workarounds? We are trying regex only because of the WPML related issue: https://github.com/10up/safe-redirect-manager/issues/153. Using regex would be a useful workaround, but unfortunately without using slashes not very useful. Do let me know if I can help
It works anyway despite the square brackets get URL encoded. The data is available in the script. @jeffpaul Do we need to fix the visual representation of the parameters then?
@jayedul could be worth fixing the visual representation as long as that doesn't impact functionality negatively