From df626fdd43330e81d5df2f7f43b896757c51ad11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Thu, 12 Oct 2017 21:28:17 +0200 Subject: [PATCH] Fix the notification bug with newlines --- app/javascript/mastodon/actions/notifications.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/javascript/mastodon/actions/notifications.js b/app/javascript/mastodon/actions/notifications.js index ebdf213223..4a4462e1d3 100644 --- a/app/javascript/mastodon/actions/notifications.js +++ b/app/javascript/mastodon/actions/notifications.js @@ -42,6 +42,7 @@ const fetchRelatedRelationships = (dispatch, notifications) => { const unescapeHTML = (html) => { const wrapper = document.createElement('div'); + html = html.replace(/
|
|\n/, ' '); wrapper.innerHTML = html; return wrapper.textContent; };