diff --git a/index.html b/index.html index 6e0689c..e9c9831 100644 --- a/index.html +++ b/index.html @@ -973,6 +973,11 @@ const CAT_LABELS = { const CAT_ORDER = ['posimai','sns','media','news','tools','nav','shop']; +// ── HTML エスケープ ───────────────────────────────────────── +function esc(s) { + return String(s ?? '').replace(/&/g,'&').replace(//g,'>').replace(/"/g,'"').replace(/'/g,'''); +} + // ── カスタムアプリ ────────────────────────────────────────── function loadCustomApps() { try { @@ -1147,21 +1152,21 @@ function renderApps() { const isInitial = app.icon === '_initial'; const iconHTML = isInitial - ? `
${app.label.charAt(0).toUpperCase()}
` - : ``; + ? `
${esc(app.label).charAt(0).toUpperCase()}
` + : ``; const delBtn = isCustom - ? `` + ? `` : ''; return `
${delBtn} ${iconHTML} - ${app.label} + ${esc(app.label)}