def mark_safe(s):
    if isinstance(s, SafeData):
        return s
    if isinstance(s, bytes) or (isinstance(s, Promise) and s._delegate_bytes):
        return SafeBytes(s)
    if isinstance(s, (six.text_type, Promise)):
        return SafeText(s)
    return SafeString(str(s))
Explicitly mark a string as safe for (HTML) output purposes. The returned
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/utils/safestring.py/mark_safe