Replaces the destination of every inline link or image and every reference definition whose scheme is unsafe by
#; the visible text of the link stays. Applied to the prose between fenced blocks, code spans included: a link
written inside backticks is literal text, so changing it costs nothing and removes any doubt about what is code.
Methods
neutralize_unsafe_links
neutralize_unsafe_links(text: str) -> str
Replaces the destination of every inline link or image and every reference definition whose scheme is unsafe by
#; the visible text of the link stays. Applied to the prose between fenced blocks, code spans included: a link
written inside backticks is literal text, so changing it costs nothing and removes any doubt about what is code.
| Parameter | Type | Description |
|---|---|---|
| text | str |
Generated with Flude
Copyright © 2026