Display bug fixes

* Improve escaping of javascript in UI
* Display raw JSON in commands view