diff --git a/craft/src/panels/right/styles/HtmlStylePanel.test.tsx b/craft/src/panels/right/styles/HtmlStylePanel.test.tsx index 891d2cd..f065fff 100644 --- a/craft/src/panels/right/styles/HtmlStylePanel.test.tsx +++ b/craft/src/panels/right/styles/HtmlStylePanel.test.tsx @@ -35,4 +35,10 @@ describe('HtmlStylePanel', () => { expect(container.textContent).not.toContain('Padding'); expect(container.textContent).not.toContain('Border Radius'); }); + + test('renders the security advisory', () => { + render(x

', style: {} }} />); + expect(container.textContent).toContain('Use this block with care.'); + expect(container.textContent).toContain('Scripts and event handlers are stripped'); + }); }); diff --git a/craft/src/panels/right/styles/HtmlStylePanel.tsx b/craft/src/panels/right/styles/HtmlStylePanel.tsx index 224435f..691857e 100644 --- a/craft/src/panels/right/styles/HtmlStylePanel.tsx +++ b/craft/src/panels/right/styles/HtmlStylePanel.tsx @@ -25,6 +25,13 @@ export const HtmlStylePanel: React.FC<{ selectedId: string; nodeProps: Record +

+ Use this block with care. It renders your markup as-is + on the published site. Scripts and event handlers are stripped + automatically, but anything that survives — forms, iframes, images — + can still send data to wherever it points. Only paste code you + understand or trust. +

); };