cpdocs API documentation
Project documentation Docs

safe_link_destination Python

Defined in html.py

def cpdocs.rendering.html.safe_link_destination(href: str) -> str | None

Return a documentation link destination if it is safe to emit, otherwise `None`.

Relative links and anchors carry no scheme and are kept; a destination with a scheme is kept only for HTTP(S), mail and cpdocs's own `projectdocs:` links.

Available in feature sets