Some bugfixes

* a bugfix for image on add/edit event
* a bugfix for json parse when event has a single quote