Added function to format HMTL Messages