def markdown_escape_field(obj, field_name):
 if isinstance(obj, Model):
  setattr(obj, field_name, djblets_markdown.markdown_escape(getattr(obj, field_name)))
 elif isinstance(obj, dict):
  obj[field_name] = djblets_markdown.markdown_escape(obj[field_name])
 else:
  raise TypeError((u'Unexpected type %r passed to markdown_escape_field' % obj))

def markdown_escape_field ( obj , field_name ) : if isinstance ( obj , Model ) : setattr ( obj , field_name , djblets_markdown . markdown_escape ( getattr ( obj , field_name ) ) ) elif isinstance ( obj , dict ) : obj [ field_name ] = djblets_markdown . markdown_escape ( obj [ field_name ] ) else : raise TypeError ( ( u'Unexpected type %r passed to markdown_escape_field' % obj ) )
escapes markdown text in a model or dictionarys field .