Fix xss vulnerability in example chat app

- Remove html concat
- Use jQuery functions instead