HTML (Hypertext Markup Language)

def html(content, **kwargs):
    """HTML (Hypertext Markup Language)"""
    if hasattr(content, 'read'):
        return content
    elif hasattr(content, 'render'):
        return content.render().encode('utf8')

    return str(content).encode('utf8')