Prevent square brackets in Custom Links menu item converting to ASCII code?
-
I need to set up numerous Custom Links in a menu. The URLs have square brackets in them.
Upon saving the menu, WordPress is encoding the square brackets into ASCII codes. I’d rather it didn’t, as it’s not necessary as far as WordPress recognising the URLs is concerned, and it makes the URLs harder to decipher.
An example URL would be:
my-domain.com.au/?filter=taxonomy[1-443]&taxonomy2=[27]
This gets converted to:
my-domain.com.au/?filter=taxonomy%5B1-443%5D&taxonomy2=%5B27%5D
Is there any way to prevent this from occurring?
Also, perhaps more importantly, is there any issue that might arise by preventing it — are the valid reasons not to prevent them encoding?Thank you.
- The topic ‘Prevent square brackets in Custom Links menu item converting to ASCII code?’ is closed to new replies.