Sanitizing user input with simplehtmldom by removing all attributes like onclick,onkeydown etc
I use simplehtmldom (http://sourceforge.net/projects/simplehtmldom/) and the following code to sanitize user input ($ticket_text, removing things like onclick, onkeydown, etc.):