From: Ondřej Hruška Date: Sat, 14 Oct 2017 12:41:12 +0000 (+0200) Subject: replace newlines in desktop notif with spaces instead of removing them (#5361) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=ae716a12e1604a4df54acbc77ff35f591e3168e2;p=mastodon.git replace newlines in desktop notif with spaces instead of removing them (#5361) --- diff --git a/app/javascript/mastodon/actions/notifications.js b/app/javascript/mastodon/actions/notifications.js index c7d248122..b24ac8b73 100644 --- a/app/javascript/mastodon/actions/notifications.js +++ b/app/javascript/mastodon/actions/notifications.js @@ -31,6 +31,7 @@ const fetchRelatedRelationships = (dispatch, notifications) => { const unescapeHTML = (html) => { const wrapper = document.createElement('div'); + html = html.replace(/
|
|\n/, ' '); wrapper.innerHTML = html; return wrapper.textContent; };