code: def render_markdown(text, context=None):
      
      if context is None or not isinstance(context, dict):
          context = {}
      markdown_html = _transform_markdown_into_html(text)
      sanitised_markdown_html = _sanitise_markdown_html(markdown_html)
      return mark_safe(sanitised_markdown_html)
docs: Turn markdown into HTML.