def markdown_render_conditional(text, rich_text):
 if rich_text:
  return render_markdown(text)
 else:
  return escape(text)

def markdown_render_conditional ( text , rich_text ) : if rich_text : return render_markdown ( text ) else : return escape ( text )
return the escaped html content based on the rich_text flag .