From b4fc7b1b27eae09ffe60348ca23abc03780412ad Mon Sep 17 00:00:00 2001 From: Hazelnoot Date: Fri, 13 Jun 2025 14:00:07 -0400 Subject: [PATCH] use permissive mode to find HTML content --- packages/backend/src/core/activitypub/models/ApNoteService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/core/activitypub/models/ApNoteService.ts b/packages/backend/src/core/activitypub/models/ApNoteService.ts index aa0f6d0140..7ace1421d7 100644 --- a/packages/backend/src/core/activitypub/models/ApNoteService.ts +++ b/packages/backend/src/core/activitypub/models/ApNoteService.ts @@ -714,9 +714,9 @@ export class ApNoteService { if (file) files.push(file); } - // Extract inline media from markdown content. + // Extract inline media from HTML content. // Don't use source.content, _misskey_content, or anything else because those aren't HTML. - const htmlContent = getContentByType(note, 'text/html'); + const htmlContent = getContentByType(note, 'text/html', true); if (htmlContent) { for (const attach of extractMediaFromHtml(htmlContent)) { attach.sensitive ??= note.sensitive;