mirror of
https://github.com/discourse/discourse.git
synced 2025-01-22 15:56:30 +08:00
hook up sanitizer
This commit is contained in:
parent
31c5859bbe
commit
d4bc423320
|
@ -91,7 +91,10 @@ Discourse.Utilities =
|
||||||
range.select()
|
range.select()
|
||||||
|
|
||||||
markdownConverter: (opts)->
|
markdownConverter: (opts)->
|
||||||
converter = new Markdown.Converter()
|
if opts.sanitize
|
||||||
|
converter = new Markdown.getSanitizingConverter()
|
||||||
|
else
|
||||||
|
converter = new Markdown.Converter()
|
||||||
|
|
||||||
mentionLookup = opts.mentionLookup if opts
|
mentionLookup = opts.mentionLookup if opts
|
||||||
mentionLookup = mentionLookup || Discourse.Mention.lookupCache
|
mentionLookup = mentionLookup || Discourse.Mention.lookupCache
|
||||||
|
|
|
@ -141,6 +141,7 @@ window.Discourse.ComposerView = window.Discourse.View.extend
|
||||||
@editor = editor = new Markdown.Editor(Discourse.Utilities.markdownConverter(
|
@editor = editor = new Markdown.Editor(Discourse.Utilities.markdownConverter(
|
||||||
lookupAvatar: (username) ->
|
lookupAvatar: (username) ->
|
||||||
Discourse.Utilities.avatarImg(username: username, size: 'tiny')
|
Discourse.Utilities.avatarImg(username: username, size: 'tiny')
|
||||||
|
sanitize: true
|
||||||
))
|
))
|
||||||
|
|
||||||
$uploadTarget = $('#reply-control')
|
$uploadTarget = $('#reply-control')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user