Convert dict into formatted HTML.

def html_list(data):
    """Convert dict into formatted HTML."""
    if data is None:
        return None
    as_li = lambda v: "<li>%s</li>" % v
    items = [as_li(v) for v in data]
    return mark_safe("<ul>%s</ul>" % ''.join(items))