Fix JS parse error for HTML snippet in single quotes

#8 

#### Changes

* pass HTML snippet through json_encode() for embed JS