format content of generated notes as valid HTML5