diff --git a/docs/index.html b/docs/index.html
index 7505048..a0f4c9f 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -417,7 +417,17 @@ cliInput.addEventListener('keydown', (e) => {
const val = cliInput.value.trim();
const row = document.createElement('div');
row.className = 'term-line';
- row.innerHTML = `❯ ${val}`;
+
+ // SECURITY FIX: Create DOM elements safely to prevent XSS
+ const prompt = document.createElement('span');
+ prompt.className = 'term-accent';
+ prompt.textContent = '❯';
+
+ const commandText = document.createElement('span');
+ commandText.textContent = ` ${val}`; // textContent automatically escapes HTML
+
+ row.appendChild(prompt);
+ row.appendChild(commandText);
cliInput.parentElement.before(row);
const res = document.createElement('div');