From: cwm Date: Tue, 9 Jan 2018 14:52:14 +0000 (-0600) Subject: Fix newlines-to-spaces functionality (tootsuite pr #6158) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=7f4374d97dd7dce6ec9f632a3cc8527490cbe2c6;p=mastodon.git Fix newlines-to-spaces functionality (tootsuite pr #6158) --- diff --git a/app/javascript/flavours/glitch/actions/notifications.js b/app/javascript/flavours/glitch/actions/notifications.js index 9b9ebf86d..cf27eff90 100644 --- a/app/javascript/flavours/glitch/actions/notifications.js +++ b/app/javascript/flavours/glitch/actions/notifications.js @@ -42,7 +42,7 @@ const fetchRelatedRelationships = (dispatch, notifications) => { const unescapeHTML = (html) => { const wrapper = document.createElement('div'); - html = html.replace(/
|
|\n/, ' '); + html = html.replace(/
|
|\n/g, ' '); wrapper.innerHTML = html; return wrapper.textContent; };