hook up sanitizer
This commit is contained in:
parent
31c5859bbe
commit
d4bc423320
|
@ -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
|
||||
|
|
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue