Reworked HTML sanitising for comments

Made sanitisation a helper function and added regex to strip obnoxious
attributes from tags (not perfect but effective).