Change chat code to prevent XSS injection

Changed chat related JS files to use document.createTextNode.
Since the program can't use <br> anymore, This commit modifies CSS
file to accept white-space using:
```css
white-space: pre-line;
```

Putting raw text to DOM without any escaping makes the program
vulnerable to XSS injection. This can be prevented by using:
```javascript
var textNode = document.createTextNode(string);
element.appendChild(textNode);
```
Prefer using DOM instead of using raw HTML, since it can be harmful.