markdown_it.common.normalize_url module

Normalize destination URLs in links

[label]:   destination   'title'
        ^^^^^^^^^^^
markdown_it.common.normalize_url.normalizeLinkText(link: str) str[源代码]

Normalize autolink content

<destination>
 ~~~~~~~~~~~
markdown_it.common.normalize_url.normalize_uri(uri: str) str[源代码]
markdown_it.common.normalize_url.unescape_char(s: str) str[源代码]
markdown_it.common.normalize_url.unescape_normalize_uri(x: str) str[源代码]
markdown_it.common.normalize_url.unescape_string(s: str) str[源代码]

Replace entities and backslash escapes with literal characters.

markdown_it.common.normalize_url.unescape_unquote(x: str) str[源代码]

Validate URL link is allowed in output.

This validator can prohibit more than really needed to prevent XSS. It’s a tradeoff to keep code simple and to be secure by default.

Note: url should be normalized at this point, and existing entities decoded.