Fix indent and whitespaces
Make sure single quotes are encoded and avoid javascript injection