Fix Javascript syntax error when entering comments