]> cat aescling's git repositories - mastodon.git/commitdiff
replace newlines in desktop notif with spaces instead of removing them (#5361)
authorOndřej Hruška <ondra@ondrovo.com>
Sat, 14 Oct 2017 12:41:12 +0000 (14:41 +0200)
committerEugen Rochko <eugen@zeonfederated.com>
Sat, 14 Oct 2017 12:41:12 +0000 (14:41 +0200)
app/javascript/mastodon/actions/notifications.js

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