]> git.cworth.org Git - zombocom-ai/blobdiff - index.html
Fix DOM code so that prompt and code appear for each image
[zombocom-ai] / index.html
index 83afa86e19aaa418a21fbc1825141cdfb52756c6..fb8cbc0d3a7f52006518d8c1baf172378a50b843 100644 (file)
@@ -135,9 +135,11 @@ mute.addEventListener("click", () => {
         const img = document.createElement('img');
         img.src = image.filename;
         const p_prompt = document.createElement('p');
-        p_prompt.innerHtml = `Prompt: ${image.prompt}`;
+        const prompt_text = document.createTextNode(`Prompt: ${image.prompt}`);
+        p_prompt.appendChild(prompt_text);
         const p_code = document.createElement('p');
-        p_code.innerHtml = `Code: ${image.code}`;
+        const code_text = document.createTextNode(`Code: ${image.code}`);
+        p_code.appendChild(code_text);
         images.appendChild(img);
         images.appendChild(p_prompt);
         images.appendChild(p_code);