]> git.babelmonkeys.de Git - adhocweb.git/commitdiff
Convert newlines to <br/>, for better readability
authorFlorian Zeitz <florob@babelmonkeys.de>
Wed, 6 Oct 2010 17:21:13 +0000 (19:21 +0200)
committerFlorian Zeitz <florob@babelmonkeys.de>
Wed, 6 Oct 2010 17:21:13 +0000 (19:21 +0200)
js/main.js

index 1011dc87e58a9f4361130410e82282db34bb12c2..4db92c80f4e46782625b3601869a4e202f667de9 100644 (file)
@@ -51,6 +51,7 @@ function addNote(elem, text, type) {
     if (!type) {
        type = "info";
     }
+    text = text.replace(/\n/g, "<br/>");
     $(elem).append("<p class='" + type + "Note'>" + text + "</p>");
 }