Seems interesting, but at the same time...
If you do this you will give up your edge, I mean, in order for this to work there has to be a link in some webpage that has code injection (if this is your site or profile or something personal, I'm not really sure how you plea innocence), also if someone finds this then anyone can hack it, because google will show it in a search and even cache it.(Assuming they don't filter it, because if they did it would become useless even to the attacker)
The best way to protect yourself is still not to have any kind of flaw