Sanitizes comments in order to avoid XSS attacks (#372).

I've tried adding some tests, but was unsure of where to put them. Please let me know if you want them somewhere else, or if I've missed something.