From 16450619325f7b7a8af08ae6618866c86c2a87df Mon Sep 17 00:00:00 2001 From: James Date: Sat, 14 Mar 2026 23:39:17 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20menu=20buttons=20broken=20when=20title?= =?UTF-8?q?=20contains=20apostrophes=20=E2=80=94=20use=20showAttachModalBy?= =?UTF-8?q?Id=20to=20avoid=20inline=20onclick=20escaping=20issues?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- portal/templates/app/project.html | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/portal/templates/app/project.html b/portal/templates/app/project.html index 8a51b77..0382136 100644 --- a/portal/templates/app/project.html +++ b/portal/templates/app/project.html @@ -526,8 +526,8 @@ ${labelPill(label)} ${item.answer_count > 0 - ? `${item.answer_count}` - : ``} + ? `${item.answer_count}` + : ``} ${escHtml(buyerComment)} ${escHtml(sellerComment)} @@ -535,7 +535,7 @@ @@ -800,6 +800,13 @@ } // ---- Attach answer modal ---- + function showAttachModalById(reqId) { + const item = treeData.find(t => t.entry_id === reqId); + const d = item ? (item.data || {}) : {}; + const title = d.title || d.description || 'Untitled'; + showAttachModal(reqId, title); + } + function showAttachModal(reqId, reqTitle) { attachRequestId = reqId; document.getElementById('attachReqTitle').textContent = reqTitle;