Inconsistency in XSS protection

When I send something like onclick='' , I get auto-blocked. but it’s not the same for when I send onclick="" , It allows the message to pass. unless I enter () example: onclick="()" . why is that?

why was my post hidden?