bug #5024 : Fix some XSS defects

Encode title and description from XSS attack of a scheduled event when creating it.
Encode the message passed as query parameter in the periodic idle request sent from an HTML frame.