Fix filter() call in get_content_snippet not working on Python 2.7+