added sanitize and linkify functions. Moved some js to lib/

This commit is contained in:
Dmitriy Zaporozhets 2013-03-19 15:54:58 +02:00
parent 2465a4fdb2
commit 4403f71f45
5 changed files with 9 additions and 2 deletions

View file

@ -70,7 +70,7 @@
renderNote: (note) ->
author = '<strong class="wall-author">' + note.author.name + '</strong>'
body = '<span class="wall-text">' + note.body + '</span>'
body = '<span class="wall-text">' + linkify(sanitize(note.body)) + '</span>'
file = ''
time = '<abbr class="timeago" title="' + note.created_at + '">' + note.created_at + '</time>'
@ -80,4 +80,3 @@
html = '<li>' + author + body + file + time + '</li>'
$('ul.notes').append(html)