MCPcopy Create free account
hub / github.com/dresende/node-orm2 / renderMessage

Function renderMessage

examples/anontxt/public/app.js:59–68  ·  view source on GitHub ↗
(msg)

Source from the content-addressed store, hash-verified

57 }
58
59 function renderMessage(msg) {
60 var html = '';
61 html += '<div class="message" data-id="' + msg.id + '">'
62 html += '<div class="meta">' + msg.createdAt + '</div>';
63 html += '<h4>' + escapeHtml(msg.title) + '</h4>';
64 html += '<p>' + escapeHtml(msg.body).replace(/\n/g, '<br/>') + '</p>';
65 html += renderComments(msg.comments);
66 html += '</div>'
67 return html;
68 }
69
70 function renderErrors(errors) {
71 var key, value;

Callers 2

loadMessagesFunction · 0.85
app.jsFile · 0.85

Calls 2

escapeHtmlFunction · 0.85
renderCommentsFunction · 0.85

Tested by

no test coverage detected