def _reformat_markdown_safe(text: str) ->str:
    """
    Sanitizes the provided text of special markdown characters. `_` and `*` characters
    are sanitized.
    """
    text = text.replace('_', '\\_')
    text = text.replace('*', '\\*')
    return text
