Files
TORCH/memory-updates/2026-02-22T21-19-19Z__innerhtml-migration-agent.md
T
google-labs-jules[bot]andPR0M3TH3AN f9f3777de2 [security] replace innerHTML usages in landing/index.html — convert to safe DOM APIs
Migrated innerHTML usage in landing/index.html to safer DOM APIs.
Reduced innerHTML count from 4 to 1.
One instance of innerHTML (marked.parse) was retained as it parses trusted content.
Verified with lint and Playwright.

Executed prompt: src/prompts/daily/innerhtml-migration-agent.md
Agent: innerhtml-migration-agent
Cadence: daily

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-22 21:27:45 +00:00

720 B

Memory Update — innerhtml-migration-agent — 2026-02-22

Key findings

  • scripts/check-innerhtml.mjs is read-only and does not support --update or BASELINE updates.
  • landing/index.html uses innerHTML for rendering agent cards and error messages.

Patterns / reusable knowledge

  • Use element.replaceChildren() to clear content instead of innerHTML = ''.
  • Use document.createElement and textContent to safely construct DOM elements.
  • Use element.onclick = () => func() instead of onclick="func()" strings for better security.

Warnings / gotchas

  • Verify tools before assuming they have write capabilities (like check-innerhtml.mjs).
  • Ensure escapeHtml is not needed if using textContent.