Commit Graph
2 Commits
Author SHA1 Message Date
faumaray e6745ac8cb Text: add Markdown link/image destination resolver hook
MarkdownOptions::resolver rewrites a validated link/image destination
before it is escaped and emitted, once per destination in document order.
Unsafe schemes (javascript:, data:, ...) are still dropped and never reach
the resolver. A throwing resolver falls back to the original destination;
an overlong result is bounded by MarkdownLimits::max_output.

Closes #59
2026-12-04 21:48:20 +03:00
faumaray 549c7cfccb Text: bounded CommonMark-subset Markdown parser and safe HTML renderer
Add Void/Text/Markdown.hpp: a bounded CommonMark-subset parser with a safe
HTML renderer. Raw HTML is always escaped, link/image destinations are
allow-listed (http, https, mailto or relative), and unsafe schemes such as
javascript: and data: are dropped, including entity-smuggled variants.
Add html_escape to Void/Text/Html.hpp.

Closes #58
2026-12-04 13:29:25 +03:00