def entities(string: str) -> str:
    """Turn special chars into HTML entities."""
    string = string.replace('<', '&lt;')
    string = string.replace('>', '&gt;')
    return string
Turn special chars into HTML entities.
pdfsyntax/markdown.py