Filter for rendering emoticons.

def emoticons_filter(content, exclude='', autoescape=None):
    """
    Filter for rendering emoticons.
    """
    esc = autoescape and conditional_escape or (lambda x: x)
    content = mark_safe(replace_emoticons(esc(content), exclude))
    return content