From ad0ed7528c7509f45fe3a42fe0f1572f31461b84 Mon Sep 17 00:00:00 2001 From: Oliver Hofmann Date: Sun, 17 May 2026 13:28:58 +0200 Subject: [PATCH] fix: escape newline in JS string literal (\n vs literal newline) --- src/teampulse/monitor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/teampulse/monitor.py b/src/teampulse/monitor.py index 008af54..9615347 100644 --- a/src/teampulse/monitor.py +++ b/src/teampulse/monitor.py @@ -57,7 +57,7 @@ _POLL_JS = """() => { // which includes sender name and timestamp const pEls = msg.querySelectorAll('p'); const text = pEls.length > 0 - ? Array.from(pEls).map(p => p.innerText.trim()).filter(t => t).join('\n') + ? Array.from(pEls).map(p => p.innerText.trim()).filter(t => t).join('\\n') : msg.innerText.trim(); const id = msg.getAttribute('id') || (sender + '_' + text.substring(0, 40)); msgs.push({ sender, text, id });