I have a URL that I need to put in my custom menu, but it contains square brackets .
When I do this, WP strips the brackets. I’m guessing it’s because shortcode uses these.
I’ve also tried using the ascii equivalent, which works the first time, but after updating, it displays the brackets, so any subsequent changes to the menu will remove the brackets.. unless I use ascii every time any menu item needs changing.
Is there a way to do this? Do I need to add a filter?
“Many URL schemes reserve certain characters for a special meaning:
their appearance in the scheme-specific part of the URL has a
designated semantics. If the character corresponding to an octet is
reserved in a scheme, the octet must be encoded. The characters “;”,
“/”, “?”, “:”, “@”, “=” and “&” are the characters which may be
reserved for special meaning within a scheme. No other characters may
be reserved within a scheme.
Thus, only alphanumerics, the special characters “$-_.+!*'(),”, and
reserved characters used for their reserved purposes may be used
unencoded within a URL.”