WordPress menu>Custom Link: removing my link formatting and adding %20

I am pasting this url:

a href="#" id="event_inquiryToggle"TEST/a

into WordPress Custom Link menu item. When I hit save it saves it as such:

http://a%20href=#%20id=event_inquiryToggleTEST/a

As such it breaks the link.

Thoughts on what I need to add to WP to remove such functionality without having to use a third party plugin?

Topic formatting menus Wordpress

Category Web


That is perfectly fine behaviour of WordPress. You can´t just paste markup in the href field, the input gets sanitized.

Use the built-in functionality to provide special links with classes if you want a different styling. See the attached image for those fields.

You will have to activate those options through the options tab at the top of the page, though.

Edit menu entry

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.