From 94230fe565cf20ba10f6d0cd6f090a4520c174ca Mon Sep 17 00:00:00 2001 From: Noiob Date: Tue, 2 Jan 2018 19:35:24 +0100 Subject: [PATCH] Fix newlines-to-spaces functionality (#6158) yay for regexes, amirite --- app/javascript/mastodon/actions/notifications.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/mastodon/actions/notifications.js b/app/javascript/mastodon/actions/notifications.js index b24ac8b7338..502690045db 100644 --- a/app/javascript/mastodon/actions/notifications.js +++ b/app/javascript/mastodon/actions/notifications.js @@ -31,7 +31,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; };