Prevent empty div when editing comment (#12404) (#12991)
* Prevent empty div when editing comment
The template for attachments needs to remove whitespace and return empty when there are no attachments.
Fix #10220
Co-authored-by: zeripath <art27@cantab.net>