mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-14 13:27:13 +00:00
buildSubCompositionHtml previously assumed all sub-compositions used <template> wrappers. Full HTML document compositions (like the north-korea-locked-down and nyc-paris-flight registry blocks) were nested as-is inside <body>, producing invalid HTML with nested <html> and <head> elements. This caused <style> and <script> tags from the composition's <head> to be misplaced, and asset paths to fail when combined with the injected <base> tag. Now detects full HTML documents and extracts head styles/scripts and body content separately, producing clean valid HTML where the composition's CSS lands in <head> and asset-relative paths resolve correctly via the <base> tag.