From 8dae0f76328966e91829fc6505c151409aca4e08 Mon Sep 17 00:00:00 2001
From: Andreas <andreasv@fsmpi.rwth-aachen.de>
Date: Mon, 21 Aug 2017 20:14:56 +0200
Subject: [PATCH] javascript string replace...

---
 static/moderator.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/static/moderator.js b/static/moderator.js
index d4a2964..78d3cba 100644
--- a/static/moderator.js
+++ b/static/moderator.js
@@ -63,10 +63,10 @@ var moderator = {
 	},
 	editor: {
 		fromhtml: function (str) {
-			return str.replace('<br>', '\n')
+			return str.replace(/<br>/g, '\n')
 		},
 		tohtml: function (str) {
-			return str.replace('\n', '<br>')
+			return str.replace(/\n/g, '<br>')
 		},
 		init: function() {
 			var editable = $('.moderator_editor');
-- 
GitLab