From db8d90f579d2735cb00bf4dc3d7e81350a9b9896 Mon Sep 17 00:00:00 2001 From: AIAMarketing Date: Fri, 30 Oct 2026 15:36:48 -0700 Subject: [PATCH] fix(portal): classify sanitized report anchors by visible label --- www/src/scripts/employee-portal.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/src/scripts/employee-portal.ts b/www/src/scripts/employee-portal.ts index d39ce1e..7d12f05 100644 --- a/www/src/scripts/employee-portal.ts +++ b/www/src/scripts/employee-portal.ts @@ -22,7 +22,7 @@ export function safePortalContent(html: string): DocumentFragment { element.setAttribute('rel', 'noopener noreferrer'); element.setAttribute('referrerpolicy', 'no-referrer'); if (url.origin !== location.origin && url.protocol === 'https:') element.setAttribute('target', '_blank'); - const presentation = portalLinkPresentation([...source.classList], source.style.backgroundColor, url.protocol); + const presentation = portalLinkPresentation([...source.classList], source.style.backgroundColor, url.protocol, source.textContent ?? ''); if (presentation) element.className = presentation; } } catch { /* Invalid destination remains visible text without navigation. */ }