Skip to content

Commit 3951907

Browse files
authored
Merge pull request #584 from liangliangyy/dev
markdown 调整
2 parents ce9c826 + 180a9e2 commit 3951907

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

blog/templatetags/blog_tags.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import random
44
import urllib
55

6-
import bleach
76
from django import template
87
from django.conf import settings
98
from django.db.models import Q
@@ -45,7 +44,6 @@ def datetimeformat(data):
4544
@register.filter()
4645
@stringfilter
4746
def custom_markdown(content):
48-
content = bleach.clean(content)
4947
return mark_safe(CommonMarkdown.get_markdown(content))
5048

5149

templates/blog/tags/article_info.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ <h1 class="entry-title">
6060
<hr class="break_line"/>
6161
{% endif %}
6262
<div class="article">
63-
{{ article.body|custom_markdown|escape }}
63+
64+
{{ article.body|custom_markdown|escape }}
65+
6466
</div>
6567
{% endif %}
6668

0 commit comments

Comments
 (0)