html_entity_decode should happen first

Some control characters (like the new line) will break Phergie when trying to process the event. Decoding the string first prevents that.