- htmlGate.ts mirrors the four editor-output rules of the Go policy:
figure data-embed (^youtube$) and data-id (^[A-Za-z0-9_-]{11}$),
img alt with any text, ol start (integer)
- embeds.ts: EMBED_PROVIDERS (youtube on youtube-nocookie.com),
EMBED_PLACEHOLDER and expandEmbeds
- JournalPostBody and JournalCategoryHeader render
expandEmbeds(sanitizeJournalHtml(html)); payload transforms only sanitize
- .journal-embed styles (16 / 9 block, borderless iframe)
- tests: byte copy of the editor corpus, mirror and pipeline cases;
acme hello-acme carries a placeholder and the SSR smoke checks the iframe
- README Embeds section and decision note Policy amendment
467 lines
12 KiB
JSON
467 lines
12 KiB
JSON
[
|
|
{
|
|
"id": 1,
|
|
"title": "Hello Acme",
|
|
"slug": "hello-acme",
|
|
"excerpt": "Acme says hello and introduces its blog.",
|
|
"content": "## Welcome to Acme\n\nAcme builds anvils, rockets and very fast roller skates.\n",
|
|
"content_html": "<h2>Welcome to Acme</h2>\n<p>Acme builds anvils, rockets and very fast roller skates.</p>\n<figure data-embed=\"youtube\" data-id=\"dQw4w9WgXcQ\"></figure>\n",
|
|
"reading_time": 1,
|
|
"published": true,
|
|
"published_at": "2026-01-14T09:00:00+00:00",
|
|
"is_pinned": false,
|
|
"metadata": null,
|
|
"sources": null,
|
|
"author": {
|
|
"id": 1,
|
|
"first_name": "Jane",
|
|
"last_name": "Doe",
|
|
"login": "jdoe"
|
|
},
|
|
"categories": [
|
|
{
|
|
"id": 1,
|
|
"name": "News",
|
|
"slug": "news"
|
|
}
|
|
],
|
|
"tags": [
|
|
{
|
|
"id": 1,
|
|
"name": "Release",
|
|
"slug": "release"
|
|
}
|
|
],
|
|
"featured_images": [
|
|
{
|
|
"id": 1,
|
|
"url": "/storage/app/uploads/public/acme/hello.png",
|
|
"file_name": "hello.png",
|
|
"file_size": 1024
|
|
}
|
|
],
|
|
"featured_image_url": "/storage/app/uploads/public/acme/hello.png",
|
|
"translations": {},
|
|
"created_at": "2026-01-14T09:00:00+00:00",
|
|
"updated_at": "2026-02-01T10:00:00+00:00"
|
|
},
|
|
{
|
|
"id": 2,
|
|
"title": "Unsafe Sample",
|
|
"slug": "unsafe-sample",
|
|
"excerpt": "Unsafe Sample: a short summary.",
|
|
"content": "Before",
|
|
"content_html": "<p>Before</p><script>alert(1)</script><p>After</p>",
|
|
"reading_time": 1,
|
|
"published": true,
|
|
"published_at": "2026-01-13T09:00:00+00:00",
|
|
"is_pinned": false,
|
|
"metadata": null,
|
|
"sources": null,
|
|
"author": {
|
|
"id": 1,
|
|
"first_name": "Jane",
|
|
"last_name": "Doe",
|
|
"login": "jdoe"
|
|
},
|
|
"categories": [
|
|
{
|
|
"id": 1,
|
|
"name": "News",
|
|
"slug": "news"
|
|
}
|
|
],
|
|
"tags": [],
|
|
"featured_images": [],
|
|
"featured_image_url": null,
|
|
"translations": {},
|
|
"created_at": "2026-01-13T09:00:00+00:00",
|
|
"updated_at": "2026-01-13T09:00:00+00:00"
|
|
},
|
|
{
|
|
"id": 3,
|
|
"title": "Acme Note 03",
|
|
"slug": "acme-note-03",
|
|
"excerpt": "Acme Note 03: a short summary.",
|
|
"content": "Acme Note 03 is a sample post for the Acme blog.",
|
|
"content_html": "<p>Acme Note 03 is a sample post for the Acme blog.</p>",
|
|
"reading_time": 1,
|
|
"published": true,
|
|
"published_at": "2026-01-12T09:00:00+00:00",
|
|
"is_pinned": false,
|
|
"metadata": null,
|
|
"sources": null,
|
|
"author": {
|
|
"id": 1,
|
|
"first_name": "Jane",
|
|
"last_name": "Doe",
|
|
"login": "jdoe"
|
|
},
|
|
"categories": [
|
|
{
|
|
"id": 1,
|
|
"name": "News",
|
|
"slug": "news"
|
|
}
|
|
],
|
|
"tags": [],
|
|
"featured_images": [],
|
|
"featured_image_url": null,
|
|
"translations": {},
|
|
"created_at": "2026-01-12T09:00:00+00:00",
|
|
"updated_at": "2026-01-12T09:00:00+00:00"
|
|
},
|
|
{
|
|
"id": 4,
|
|
"title": "Acme Note 04",
|
|
"slug": "acme-note-04",
|
|
"excerpt": "Acme Note 04: a short summary.",
|
|
"content": "Acme Note 04 is a sample post for the Acme blog.",
|
|
"content_html": "<p>Acme Note 04 is a sample post for the Acme blog.</p>",
|
|
"reading_time": 1,
|
|
"published": true,
|
|
"published_at": "2026-01-11T09:00:00+00:00",
|
|
"is_pinned": false,
|
|
"metadata": null,
|
|
"sources": null,
|
|
"author": {
|
|
"id": 1,
|
|
"first_name": "Jane",
|
|
"last_name": "Doe",
|
|
"login": "jdoe"
|
|
},
|
|
"categories": [
|
|
{
|
|
"id": 1,
|
|
"name": "News",
|
|
"slug": "news"
|
|
}
|
|
],
|
|
"tags": [],
|
|
"featured_images": [],
|
|
"featured_image_url": null,
|
|
"translations": {},
|
|
"created_at": "2026-01-11T09:00:00+00:00",
|
|
"updated_at": "2026-01-11T09:00:00+00:00"
|
|
},
|
|
{
|
|
"id": 5,
|
|
"title": "Acme Note 05",
|
|
"slug": "acme-note-05",
|
|
"excerpt": "Acme Note 05: a short summary.",
|
|
"content": "Acme Note 05 is a sample post for the Acme blog.",
|
|
"content_html": "<p>Acme Note 05 is a sample post for the Acme blog.</p>",
|
|
"reading_time": 1,
|
|
"published": true,
|
|
"published_at": "2026-01-10T09:00:00+00:00",
|
|
"is_pinned": false,
|
|
"metadata": null,
|
|
"sources": null,
|
|
"author": {
|
|
"id": 1,
|
|
"first_name": "Jane",
|
|
"last_name": "Doe",
|
|
"login": "jdoe"
|
|
},
|
|
"categories": [
|
|
{
|
|
"id": 1,
|
|
"name": "News",
|
|
"slug": "news"
|
|
}
|
|
],
|
|
"tags": [],
|
|
"featured_images": [],
|
|
"featured_image_url": null,
|
|
"translations": {},
|
|
"created_at": "2026-01-10T09:00:00+00:00",
|
|
"updated_at": "2026-01-10T09:00:00+00:00"
|
|
},
|
|
{
|
|
"id": 6,
|
|
"title": "Acme Note 06",
|
|
"slug": "acme-note-06",
|
|
"excerpt": "Acme Note 06: a short summary.",
|
|
"content": "Acme Note 06 is a sample post for the Acme blog.",
|
|
"content_html": "<p>Acme Note 06 is a sample post for the Acme blog.</p>",
|
|
"reading_time": 1,
|
|
"published": true,
|
|
"published_at": "2026-01-09T09:00:00+00:00",
|
|
"is_pinned": false,
|
|
"metadata": null,
|
|
"sources": null,
|
|
"author": {
|
|
"id": 1,
|
|
"first_name": "Jane",
|
|
"last_name": "Doe",
|
|
"login": "jdoe"
|
|
},
|
|
"categories": [
|
|
{
|
|
"id": 1,
|
|
"name": "News",
|
|
"slug": "news"
|
|
}
|
|
],
|
|
"tags": [],
|
|
"featured_images": [],
|
|
"featured_image_url": null,
|
|
"translations": {},
|
|
"created_at": "2026-01-09T09:00:00+00:00",
|
|
"updated_at": "2026-01-09T09:00:00+00:00"
|
|
},
|
|
{
|
|
"id": 7,
|
|
"title": "Acme Note 07",
|
|
"slug": "acme-note-07",
|
|
"excerpt": "Acme Note 07: a short summary.",
|
|
"content": "Acme Note 07 is a sample post for the Acme blog.",
|
|
"content_html": "<p>Acme Note 07 is a sample post for the Acme blog.</p>",
|
|
"reading_time": 1,
|
|
"published": true,
|
|
"published_at": "2026-01-08T09:00:00+00:00",
|
|
"is_pinned": false,
|
|
"metadata": null,
|
|
"sources": null,
|
|
"author": {
|
|
"id": 1,
|
|
"first_name": "Jane",
|
|
"last_name": "Doe",
|
|
"login": "jdoe"
|
|
},
|
|
"categories": [
|
|
{
|
|
"id": 1,
|
|
"name": "News",
|
|
"slug": "news"
|
|
}
|
|
],
|
|
"tags": [],
|
|
"featured_images": [],
|
|
"featured_image_url": null,
|
|
"translations": {},
|
|
"created_at": "2026-01-08T09:00:00+00:00",
|
|
"updated_at": "2026-01-08T09:00:00+00:00"
|
|
},
|
|
{
|
|
"id": 8,
|
|
"title": "Acme Note 08",
|
|
"slug": "acme-note-08",
|
|
"excerpt": "Acme Note 08: a short summary.",
|
|
"content": "Acme Note 08 is a sample post for the Acme blog.",
|
|
"content_html": "<p>Acme Note 08 is a sample post for the Acme blog.</p>",
|
|
"reading_time": 1,
|
|
"published": true,
|
|
"published_at": "2026-01-07T09:00:00+00:00",
|
|
"is_pinned": false,
|
|
"metadata": null,
|
|
"sources": null,
|
|
"author": {
|
|
"id": 1,
|
|
"first_name": "Jane",
|
|
"last_name": "Doe",
|
|
"login": "jdoe"
|
|
},
|
|
"categories": [
|
|
{
|
|
"id": 1,
|
|
"name": "News",
|
|
"slug": "news"
|
|
}
|
|
],
|
|
"tags": [],
|
|
"featured_images": [],
|
|
"featured_image_url": null,
|
|
"translations": {},
|
|
"created_at": "2026-01-07T09:00:00+00:00",
|
|
"updated_at": "2026-01-07T09:00:00+00:00"
|
|
},
|
|
{
|
|
"id": 9,
|
|
"title": "Acme Note 09",
|
|
"slug": "acme-note-09",
|
|
"excerpt": "Acme Note 09: a short summary.",
|
|
"content": "Acme Note 09 is a sample post for the Acme blog.",
|
|
"content_html": "<p>Acme Note 09 is a sample post for the Acme blog.</p>",
|
|
"reading_time": 1,
|
|
"published": true,
|
|
"published_at": "2026-01-06T09:00:00+00:00",
|
|
"is_pinned": false,
|
|
"metadata": null,
|
|
"sources": null,
|
|
"author": {
|
|
"id": 1,
|
|
"first_name": "Jane",
|
|
"last_name": "Doe",
|
|
"login": "jdoe"
|
|
},
|
|
"categories": [
|
|
{
|
|
"id": 1,
|
|
"name": "News",
|
|
"slug": "news"
|
|
}
|
|
],
|
|
"tags": [],
|
|
"featured_images": [],
|
|
"featured_image_url": null,
|
|
"translations": {},
|
|
"created_at": "2026-01-06T09:00:00+00:00",
|
|
"updated_at": "2026-01-06T09:00:00+00:00"
|
|
},
|
|
{
|
|
"id": 10,
|
|
"title": "Acme Note 10",
|
|
"slug": "acme-note-10",
|
|
"excerpt": "Acme Note 10: a short summary.",
|
|
"content": "Acme Note 10 is a sample post for the Acme blog.",
|
|
"content_html": "<p>Acme Note 10 is a sample post for the Acme blog.</p>",
|
|
"reading_time": 1,
|
|
"published": true,
|
|
"published_at": "2026-01-05T09:00:00+00:00",
|
|
"is_pinned": false,
|
|
"metadata": null,
|
|
"sources": null,
|
|
"author": {
|
|
"id": 1,
|
|
"first_name": "Jane",
|
|
"last_name": "Doe",
|
|
"login": "jdoe"
|
|
},
|
|
"categories": [
|
|
{
|
|
"id": 1,
|
|
"name": "News",
|
|
"slug": "news"
|
|
}
|
|
],
|
|
"tags": [],
|
|
"featured_images": [],
|
|
"featured_image_url": null,
|
|
"translations": {},
|
|
"created_at": "2026-01-05T09:00:00+00:00",
|
|
"updated_at": "2026-01-05T09:00:00+00:00"
|
|
},
|
|
{
|
|
"id": 11,
|
|
"title": "Acme Note 11",
|
|
"slug": "acme-note-11",
|
|
"excerpt": "Acme Note 11: a short summary.",
|
|
"content": "Acme Note 11 is a sample post for the Acme blog.",
|
|
"content_html": "<p>Acme Note 11 is a sample post for the Acme blog.</p>",
|
|
"reading_time": 1,
|
|
"published": true,
|
|
"published_at": "2026-01-04T09:00:00+00:00",
|
|
"is_pinned": false,
|
|
"metadata": null,
|
|
"sources": null,
|
|
"author": {
|
|
"id": 1,
|
|
"first_name": "Jane",
|
|
"last_name": "Doe",
|
|
"login": "jdoe"
|
|
},
|
|
"categories": [
|
|
{
|
|
"id": 1,
|
|
"name": "News",
|
|
"slug": "news"
|
|
}
|
|
],
|
|
"tags": [],
|
|
"featured_images": [],
|
|
"featured_image_url": null,
|
|
"translations": {},
|
|
"created_at": "2026-01-04T09:00:00+00:00",
|
|
"updated_at": "2026-01-04T09:00:00+00:00"
|
|
},
|
|
{
|
|
"id": 12,
|
|
"title": "Acme Note 12",
|
|
"slug": "acme-note-12",
|
|
"excerpt": "Acme Note 12: a short summary.",
|
|
"content": "Acme Note 12 is a sample post for the Acme blog.",
|
|
"content_html": "<p>Acme Note 12 is a sample post for the Acme blog.</p>",
|
|
"reading_time": 1,
|
|
"published": true,
|
|
"published_at": "2026-01-03T09:00:00+00:00",
|
|
"is_pinned": false,
|
|
"metadata": null,
|
|
"sources": null,
|
|
"author": {
|
|
"id": 1,
|
|
"first_name": "Jane",
|
|
"last_name": "Doe",
|
|
"login": "jdoe"
|
|
},
|
|
"categories": [
|
|
{
|
|
"id": 1,
|
|
"name": "News",
|
|
"slug": "news"
|
|
}
|
|
],
|
|
"tags": [],
|
|
"featured_images": [],
|
|
"featured_image_url": null,
|
|
"translations": {},
|
|
"created_at": "2026-01-03T09:00:00+00:00",
|
|
"updated_at": "2026-01-03T09:00:00+00:00"
|
|
},
|
|
{
|
|
"id": 13,
|
|
"title": "Uncategorised Note",
|
|
"slug": "uncategorised-note",
|
|
"excerpt": "Uncategorised Note: a short summary.",
|
|
"content": "Uncategorised Note is a sample post for the Acme blog.",
|
|
"content_html": "<p>Uncategorised Note is a sample post for the Acme blog.</p>",
|
|
"reading_time": 1,
|
|
"published": true,
|
|
"published_at": "2026-01-02T09:00:00+00:00",
|
|
"is_pinned": false,
|
|
"metadata": null,
|
|
"sources": null,
|
|
"author": null,
|
|
"categories": [],
|
|
"tags": [],
|
|
"featured_images": [],
|
|
"featured_image_url": null,
|
|
"translations": {},
|
|
"created_at": "2026-01-02T09:00:00+00:00",
|
|
"updated_at": "2026-01-02T09:00:00+00:00"
|
|
},
|
|
{
|
|
"id": 14,
|
|
"title": "Draft Note",
|
|
"slug": "draft-note",
|
|
"excerpt": "Draft Note: a short summary.",
|
|
"content": "Draft Note is a sample post for the Acme blog.",
|
|
"content_html": "<p>Draft Note is a sample post for the Acme blog.</p>",
|
|
"reading_time": 1,
|
|
"published": false,
|
|
"published_at": "2026-01-20T09:00:00+00:00",
|
|
"is_pinned": false,
|
|
"metadata": null,
|
|
"sources": null,
|
|
"author": {
|
|
"id": 1,
|
|
"first_name": "Jane",
|
|
"last_name": "Doe",
|
|
"login": "jdoe"
|
|
},
|
|
"categories": [
|
|
{
|
|
"id": 1,
|
|
"name": "News",
|
|
"slug": "news"
|
|
}
|
|
],
|
|
"tags": [],
|
|
"featured_images": [],
|
|
"featured_image_url": null,
|
|
"translations": {},
|
|
"created_at": "2026-01-20T09:00:00+00:00",
|
|
"updated_at": "2026-01-20T09:00:00+00:00"
|
|
}
|
|
]
|