fix(codegen): render template content safely
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Snider 2026-04-15 02:20:00 +01:00
parent 4bbdb10080
commit 871b29582f

View file

@ -51,7 +51,7 @@ var wcTemplate = template.Must(template.New("wc").Parse(`class {{.ClassName}} ex
}
render(html) {
const tpl = document.createElement("template");
tpl.insertAdjacentHTML("afterbegin", html);
tpl.innerHTML = html;
this.#shadow.textContent = "";
this.#shadow.appendChild(tpl.content.cloneNode(true));
}