def markup_description(description):
    if apply_markdown:
        description = apply_markdown(description)
    else:
        description = escape(description).replace('\n', '<br />')
        description = '<p>' + description + '</p>'
    return mark_safe(description)
Apply HTML markup to the given description.
dataset/ETHPy150Open tomchristie/django-rest-framework/rest_framework/utils/formatting.py/markup_description