html_gen: Add example and test, highlight its safety against code injection via automatic escaping.