summaryrefslogtreecommitdiffstats
path: root/apps/comments/js/commentstabview.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/comments/js/commentstabview.js')
-rw-r--r--apps/comments/js/commentstabview.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/comments/js/commentstabview.js b/apps/comments/js/commentstabview.js
index e061ed35330..7b5a25b7e8e 100644
--- a/apps/comments/js/commentstabview.js
+++ b/apps/comments/js/commentstabview.js
@@ -587,6 +587,16 @@
$inserted.html('@' + $this.find('.avatar').data('username'));
});
+ var oldHtml;
+ var html = $comment.html();
+ do {
+ // replace works one by one
+ oldHtml = html;
+ html = oldHtml.replace("<br>", "\n"); // preserve line breaks
+ console.warn(html)
+ } while(oldHtml !== html);
+ $comment.html(html);
+
return $comment.text();
},