| | 1 | Hey @MacLeroy, thanks for posting your first ticket! |
| | 2 | |
| | 3 | Are you trying to save a link with an onclick attribute, like this? |
| | 4 | |
| | 5 | <a href="http://www.example.com" onclick="trackOutboundLink('http://www.example.com'); return false;">Check out example.com</a> |
| | 6 | |
| | 7 | |
| | 8 | The Custom HTML widget sanitizes the submitted HTML by checking against a list of allowed HTML tags and their allowed attributes. By default, the onclick attribute isn't allowed for the A tag, so the code linter is warning you that it found invalid code, like @1naveengiri mentioned above. |
| | 9 | |
| | 10 | However, if you're an admin or have the capability of posting unfiltered HTML, you should be able to save a link like the one above. I was able to save that example link above in a Custom HTML widget. |
| | 11 | |
| | 12 | Are you an admin on this site you're working on? |
| | 13 | Do you have any other plugins installed and activated? |
| | 14 | Are you using one of default themes? |
| | 15 | |
| | 16 | I'm wondering if something else is conflicting and causing the error you're seeing. |
| | 17 | |
| | 18 | Thanks for contributing to WordPress! |