fix: preserve HTML links in notification panel history entries

This commit is contained in:
JohnBaumb 2026-04-27 15:12:55 -07:00
parent d70d2d1b69
commit ace16e625f

View file

@ -4845,7 +4845,7 @@ function showToastHtml(html, type = 'info', duration = 6000) {
// Add to notification history (strip tags for plain text) // Add to notification history (strip tags for plain text)
const tmp = document.createElement('div'); tmp.innerHTML = html; const tmp = document.createElement('div'); tmp.innerHTML = html;
const plainText = tmp.textContent || tmp.innerText || ''; const plainText = tmp.textContent || tmp.innerText || '';
const entry = { id: Date.now() + Math.random(), message: plainText, type, helpSection: null, timestamp: Date.now(), read: false }; const entry = { id: Date.now() + Math.random(), message: plainText, htmlMessage: html, type, helpSection: null, timestamp: Date.now(), read: false };
_notifState.history.unshift(entry); _notifState.history.unshift(entry);
if (_notifState.history.length > _notifState.maxHistory) _notifState.history.pop(); if (_notifState.history.length > _notifState.maxHistory) _notifState.history.pop();
_notifState.unreadCount++; _notifState.unreadCount++;
@ -4920,7 +4920,7 @@ function _openNotifPanel() {
${unreadDot} ${unreadDot}
<span class="notif-entry-icon notif-icon-${e.type}">${icon}</span> <span class="notif-entry-icon notif-icon-${e.type}">${icon}</span>
<div class="notif-entry-body"> <div class="notif-entry-body">
<div class="notif-entry-msg">${_escToast(e.message)}</div> <div class="notif-entry-msg">${e.htmlMessage || _escToast(e.message)}</div>
<div class="notif-entry-meta">${ago}${learnMore}</div> <div class="notif-entry-meta">${ago}${learnMore}</div>
</div> </div>
</div>`; </div>`;