hook up sanitizer

This commit is contained in:
Sam Saffron 2013-02-06 17:22:11 +11:00
parent 31c5859bbe
commit d4bc423320
2 changed files with 5 additions and 1 deletions

View File

@ -91,7 +91,10 @@ Discourse.Utilities =
range.select()
markdownConverter: (opts)->
converter = new Markdown.Converter()
if opts.sanitize
converter = new Markdown.getSanitizingConverter()
else
converter = new Markdown.Converter()
mentionLookup = opts.mentionLookup if opts
mentionLookup = mentionLookup || Discourse.Mention.lookupCache

View File

@ -141,6 +141,7 @@ window.Discourse.ComposerView = window.Discourse.View.extend
@editor = editor = new Markdown.Editor(Discourse.Utilities.markdownConverter(
lookupAvatar: (username) ->
Discourse.Utilities.avatarImg(username: username, size: 'tiny')
sanitize: true
))
$uploadTarget = $('#reply-control')