Permalink
Browse files

correctly handle new lines

  • Loading branch information...
1 parent 5e35dfa commit 1faced91275ddf1cf7eebfb3341cb98a52359c01 Gatlin Johnson committed Sep 20, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 templates/index.html
View
@@ -27,9 +27,10 @@
$.ev.loop('/recv/'+UUID, {
response: function(ev) {
+ var r = ev.response;
+ r = r.replace("\n","<br>");
console.log(ev);
- $("#response").html($("#response").html() +
- "<div>"+ev.response+"</div>");
+ $("#response").html($("#response").html() + r);
},
});
};

0 comments on commit 1faced9

Please sign in to comment.