From 8c93f7eb6898ce755e7a63481b4c5c7217b1a298 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Thu, 12 Oct 2023 15:57:32 +0200 Subject: [PATCH] [backend] Format urls in outgoing AP messages properly --- packages/backend/src/mfm/to-html.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/mfm/to-html.ts b/packages/backend/src/mfm/to-html.ts index cca7474dc..0e876f8ae 100644 --- a/packages/backend/src/mfm/to-html.ts +++ b/packages/backend/src/mfm/to-html.ts @@ -157,7 +157,7 @@ export function toHtml( url(node) { const a = doc.createElement("a"); a.href = node.props.url; - a.textContent = node.props.url; + a.textContent = node.props.url.replace(/^https?:\/\//, ''); return a; },