From 8b4f75bf91bef661b4d98d7db054ffa28276d08b Mon Sep 17 00:00:00 2001 From: duffyduck Date: Mon, 11 May 2026 19:12:59 +0200 Subject: [PATCH] fix(diagnostic): /shared/uploads/-Bilder im History-Load auch inline rendern Co-Authored-By: Claude Opus 4.7 (1M context) --- diagnostic/index.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/diagnostic/index.html b/diagnostic/index.html index 63fc182..4307583 100644 --- a/diagnostic/index.html +++ b/diagnostic/index.html @@ -1109,7 +1109,12 @@ // [FILE: ...]-Marker rausfiltern (gleicher Filter wie addChat) const cleaned = (m.text || '').replace(/\[FILE:\s*\/shared\/uploads\/[^\]]+\]/gi, '').replace(/\n{3,}/g, '\n\n').trim(); const escaped = escapeHtml(cleaned); - const linked = linkifyText(escaped); + let linked = linkifyText(escaped); + // /shared/uploads/-Bildpfade auch im History inline rendern + // (gleicher Replace wie in addChat — sonst sieht man nach F5 nur Text-Pfade) + linked = linked.replace(/\/shared\/uploads\/[^\s<"]+\.(jpg|jpeg|png|gif|webp|svg|bmp)/gi, (match) => { + return `${match}`; + }); const time = m.ts ? new Date(m.ts).toLocaleTimeString('de-DE') : '?'; el.innerHTML = `${linked}
${escapeHtml(m.meta)} — ${time}
`; chatBox.appendChild(el);