markdown_it.common.normalize_url module¶
-
markdown_it.common.normalize_url.
normalizeLink
(url: str) → str[source]¶ Normalize destination URLs in links
[label]: destination 'title' ^^^^^^^^^^^
-
markdown_it.common.normalize_url.
normalizeLinkText
(link: str) → str[source]¶ Normalize autolink content
<destination> ~~~~~~~~~~~
-
markdown_it.common.normalize_url.
unescape_string
(s: str) → str[source]¶ Replace entities and backslash escapes with literal characters.
-
markdown_it.common.normalize_url.
validateLink
(url: str, validator: Optional[Callable] = None) → bool[source]¶ 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.