def mark_for_escaping(s):
    if isinstance(s, (SafeData, EscapeData)):
        return s
    if isinstance(s, bytes) or (isinstance(s, Promise) and s._delegate_bytes):
        return EscapeBytes(s)
    if isinstance(s, (six.text_type, Promise)):
        return EscapeText(s)
    return EscapeBytes(bytes(s))
invalid closed subcategory
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/utils/safestring.py/mark_for_escaping--crossover with--dataset/ETHPy150Open nitely/Spirit/spirit/topic/tests.py/TopicFormTest.test_topic_publish_invalid_closed_subcategory