DiscordChatExporter/DiscordChatExporter.Core
MildlyMeticulous ce5207c8a0 Only allow http(s) URLs in exported HTML links (fixes #1575)
Embed URLs never pass through the markdown parser, so the regex change in
#1568 did not cover them and a javascript: URL in embed.url or
embed.author.url still reached a live href.

Adds ExportContext.EnsureSafeUrl, which returns the URL only when it parses
as an absolute http or https URI, and applies it at the four embed anchors.
An unsafe URL now takes the existing else branch, so the title and author
text still render, just without a link.

HtmlMarkdownVisitor.VisitLinkAsync uses the same helper and renders the link
children without an anchor when the scheme is not allowed, so the three link
regexes in MarkdownParser are no longer the only thing keeping unsafe schemes
out of the export.
2026-07-28 10:50:14 +01:00
..
Discord Refactor 2026-07-25 21:18:39 +03:00
Exceptions Remove BOM 2026-04-19 23:13:12 +03:00
Exporting Only allow http(s) URLs in exported HTML links (fixes #1575) 2026-07-28 10:50:14 +01:00
Markdown Fix grammar 2026-07-25 20:28:29 +03:00
Utils Refactor 2026-07-25 21:18:39 +03:00
DiscordChatExporter.Core.csproj Update packages 2026-06-08 15:52:10 +03:00