Filter out duplicates
Filter out empty notes
Escape chars in HTML output