fix javascript syntax around freemarker variable