Building an Isolated Preview for AI-Generated HTML
An iframe with srcdoc feels like a safe place to render HTML a model wrote. It isn’t. Three tests show how the preview can read your page, escape the frame, and phone home, and four layers of protection close each hole.