Skip to content
This repository has been archived by the owner on Jun 29, 2020. It is now read-only.

Commit

Permalink
全てのHTMLタグを許可している旨をmarkdownフィルタのドキュメントに追記
Browse files Browse the repository at this point in the history
  • Loading branch information
giginet committed Jul 8, 2014
1 parent 9d43049 commit 9814c41
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/kawaz/core/templatetags/templatetags/markdown.py
Expand Up @@ -15,6 +15,13 @@ def markdown(value):
kawaz.core.templatetagsでbuilt-in指定されています
そのため、{% load markdown %}は不要です
Notice:
ブログパーツの使用などの利便性を持たせるために
全てのHTMLタグを許可しています。
セキュリティ上の懸念はありますが、このフィルタが適応されるのは
Children権限以上のユーザーが作成したコンテンツのみであり
本ポータルの性質から考えて悪用の可能性は少ないという判断です。
Extras:
footnotes
https://github.com/trentm/python-markdown2/wiki/footnotes
Expand Down
4 changes: 4 additions & 0 deletions src/kawaz/core/templatetags/tests/test_markdown.py
Expand Up @@ -47,6 +47,10 @@ def test_markdown_with_code_friendly(self):
def test_markdown_with_html(self):
'''
markdown内にHTMLも記述できる
Notice:
全てのHTMLを許可している理由は
markdownフィルタのdocstringを参照のこと
'''
before = ("# h1\n"
"<div>HTMLタグも効く</div>\n"
Expand Down

0 comments on commit 9814c41

Please sign in to comment.