Added code to escape "'" before JS output.