]> cat aescling's git repositories - mastodon.git/commitdiff
Fix the notification bug with newlines
authorOndřej Hruška <ondra@ondrovo.com>
Thu, 12 Oct 2017 19:28:17 +0000 (21:28 +0200)
committerOndřej Hruška <ondra@ondrovo.com>
Thu, 12 Oct 2017 19:28:17 +0000 (21:28 +0200)
app/javascript/mastodon/actions/notifications.js

index ebdf21322324e00701eeabd1af4fb9c5f5073c1c..4a4462e1d328e58ef05175bc5dec74f50ebdd292 100644 (file)
@@ -42,6 +42,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;
 };
This page took 0.028224 seconds and 3 git commands to generate.