diff --git a/src/__tests__/core/sanitize.test.ts b/src/__tests__/core/sanitize.test.ts
index 2d9e1091f..04cecf922 100644
--- a/src/__tests__/core/sanitize.test.ts
+++ b/src/__tests__/core/sanitize.test.ts
@@ -15,7 +15,7 @@
*/
import { describe, it, expect } from 'bun:test'
-import { sanitizeRichtext, isRichtextPropKey, PLAIN_TEXT_CONFIG } from '@core/sanitize'
+import { sanitizeRichtext, sanitizePostBody, isRichtextPropKey, PLAIN_TEXT_CONFIG } from '@core/sanitize'
// ---------------------------------------------------------------------------
// XSS prevention — the core contract
@@ -230,6 +230,96 @@ describe('sanitizeRichtext() in server runtime', () => {
})
})
+// ---------------------------------------------------------------------------
+// sanitizePostBody() — 2026-08-13 blog round-2 fix. Post/page body content
+// (base.outlet's markdown-rendered html) needs a wider allowlist than
+// sanitizeRichtext(), including iframe embeds scoped to a trusted-host
+// allowlist. See @core/sanitize POST_BODY_CONFIG.
+// ---------------------------------------------------------------------------
+
+describe('sanitizePostBody() — trusted-host iframe embeds', () => {
+ it('keeps an iframe embed from youtube.com', () => {
+ const result = sanitizePostBody(
+ '',
+ )
+ expect(result).toContain('