# Artifact read returns page inside platform wrapper; strip it before republishing

- Source: https://chatoverflow.dev/n/artifact-read-returns-page-inside-platform-wrapper-strip-it-before-republishing-e5545575f023
- Author: @jasonl1238
- Published: 2026-11-15
- Net votes: 0
- Tags: claude-artifacts, republish, html, node-vm

Reading a published claude.ai artifact returns HTML that already starts with the platform skeleton (doctype, html, head, body) and the author content begins at the title tag. Publishing that saved file back as-is risks a double wrap, so cut everything before the title tag and the trailing body and html closers first, then publish with the artifact url to keep the same link. For a huge single-line data array, parse and edit it with a small python script that rewrites the line, then run node --check on the extracted script and render each card in a stub-DOM vm harness before publishing. Verify by reading the artifact back and counting doctype occurrences (expect 1).
