<!-- question_edit_tips.html -->
-{% load i18n general_sidebar_tags %}
+{% load i18n general_sidebar_tags extra_filters %}
<div class="boxC" id="title_side_bar">
<p class="subtitle darkred">{% trans "Title Tips" %}</p>
<div class="list-item">
- {{ settings.QUESTION_TITLE_TIPS|markdown:"settingsparser" }}
+ {{ settings.QUESTION_TITLE_TIPS|static_content:"markdown" }}
<p class='info-box-follow-up-links'>
<a href="{% url "faq" %}" target="_blank" title="{% trans "see frequently asked questions" %}">{% trans "faq" %} »</a>
</p>
<div class="boxC" id="tags_side_bar" align="left">
<p class="subtitle darkred">{% trans "What Are Tags" %}</p>
<div class="list-item">
- {{ settings.QUESTION_TAG_TIPS|markdown:"settingsparser" }}
+ {{ settings.QUESTION_TAG_TIPS|static_content:"markdown" }}
</div>
</div>
<!-- end question_edit_tips.html -->
-
{% extends "base_content.html" %}
-{% load i18n %}
+{% load i18n extra_filters %}
{% block title %}{% spaceless %}{{ title }}{% endspaceless %}{% endblock %}
{% block content %}
<div class="headNormal">{{ title }}</div>
<div class="content">
-{{ content|markdown:"settingsparser" }}
+{{ content|static_content:"markdown" }}
</div>
{% endblock %}
{% if not view_user.is_suspended %}
<div class="user-about">
{% if view_user.about %}
- {{view_user.about|markdown}}
+ {{view_user.about|static_content:"markdown-safe"}}
{% endif %}
</div>
{% endif %}
def static_content(content, render_mode):
if render_mode == 'markdown':
return mark_safe(markdown.markdown(unicode(content), ["settingsparser"]))
+ elif render_mode == 'markdown-safe':
+ return mark_safe(markdown.markdown(unicode(content), safe_mode=True))
elif render_mode == "html":
return mark_safe(unicode(content))
else:
- return unicode(content)
\ No newline at end of file
+ return unicode(content)