diff --git a/shared/index.js b/shared/index.js
index ab1f9150292575077097555625c6026f1de5e569..0bf3baa8d68971c75057d3ed4d60c27488b0d1aa 100644
--- a/shared/index.js
+++ b/shared/index.js
@@ -1524,6 +1524,9 @@ function startIndex(Y,_cm,_documentObject,_userid,_capabilities, _toolbarSetting
             if(!comments.comments){
                comments = {comments: [comments]};
             }
+            comments.comments.forEach(function(comment) {
+                comment.content = comment.content.replace(/\n/g, "<br>");
+            });
             (function(templates, data) {
                 templates.render('mod_pdfannotator/comment', data)
                     .then(function(html,js){