safe-redirect-manager icon indicating copy to clipboard operation
safe-redirect-manager copied to clipboard

Redirect to a url that includes square brackets []

Open jeffpaul opened this issue 5 years ago • 1 comments

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

jeffpaul avatar Jan 29 '20 19:01 jeffpaul

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

trainoasis avatar Jun 14 '21 08:06 trainoasis

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? Screenshot 2023-06-26 at 1 58 29 PM

jayedul avatar Jun 26 '23 08:06 jayedul

@jayedul could be worth fixing the visual representation as long as that doesn't impact functionality negatively

jeffpaul avatar Jun 29 '23 15:06 jeffpaul