diff --git a/application/app.py b/application/app.py
index f9ea185a..bb349cb3 100644
--- a/application/app.py
+++ b/application/app.py
@@ -143,7 +143,7 @@ def api_answer():
# some formatting for the frontend
result['answer'] = result['result']
- result['answer'] = result['answer'].replace("\\n", "
")
+ result['answer'] = result['answer'].replace("\\n", "\n")
try:
result['answer'] = result['answer'].split("SOURCES:")[0]
except:
diff --git a/application/static/src/chat.js b/application/static/src/chat.js
index 3c997ad5..3bac21f9 100644
--- a/application/static/src/chat.js
+++ b/application/static/src/chat.js
@@ -46,6 +46,7 @@ function submitForm(event){
}
if(data.answer){
msg_html = '
'
+ data.answer = data.answer.replace(/\n/g, "
");
msg_html += data.answer
msg_html += '