def mark_safe(s):
 if hasattr(s, '__html__'):
  return s
 if (isinstance(s, bytes) or (isinstance(s, Promise) and s._delegate_bytes)):
  return SafeBytes(s)
 if isinstance(s, (str, Promise)):
  return SafeText(s)
 if callable(s):
  return _safety_decorator(mark_safe, s)
 return SafeString(str(s))

def mark_safe ( s ) : if hasattr ( s , '__html__' ) : return s if ( isinstance ( s , bytes ) or ( isinstance ( s , Promise ) and s . _delegate_bytes ) ) : return SafeBytes ( s ) if isinstance ( s , ( str , Promise ) ) : return SafeText ( s ) if callable ( s ) : return _safety_decorator ( mark_safe , s ) return SafeString ( str ( s ) )
explicitly mark a string as safe for output purposes .