开发者

Secured Markdown in Django

Does anybody know is there any django app/li开发者_如何学Cb which give secured Markdown or other markup language? Or there is no any way to give users to use Markdown in secured for my server way?


An also great solution that isn't mentionned in the link indicated in the comments, is the use of markdown2.

If you like using markdown2 ;)

And it has also a secure mode in order to avoid html/js/css execution, so it would fit your needs! :)

return Markdown(safe_mode="replace/escape/Boolean").convert(text)

You can use :

  • replace : will replace the html by an horrible text :p
  • escape : Will escape the html text (what I prefer)
  • Boolean: if set to True, will use replace. Boolean is here for retro-compatibility
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜