]> cat aescling's git repositories - mastodon.git/commitdiff
Fix newlines-to-spaces functionality (tootsuite pr #6158)
authorcwm <chriswmartin@protonmail.com>
Tue, 9 Jan 2018 14:52:14 +0000 (08:52 -0600)
committercwm <chriswmartin@protonmail.com>
Tue, 9 Jan 2018 14:52:14 +0000 (08:52 -0600)
app/javascript/flavours/glitch/actions/notifications.js

index 9b9ebf86d10b54dfa26ee3b7b8255b1f7753160b..cf27eff90e7553c1a008d11915f683cdd5fe519b 100644 (file)
@@ -42,7 +42,7 @@ const fetchRelatedRelationships = (dispatch, notifications) => {
 
 const unescapeHTML = (html) => {
   const wrapper = document.createElement('div');
-  html = html.replace(/<br \/>|<br>|\n/, ' ');
+  html = html.replace(/<br \/>|<br>|\n/g, ' ');
   wrapper.innerHTML = html;
   return wrapper.textContent;
 };