Skip to content
Snippets Groups Projects
Commit bb49e0ca authored by Chris Lawton's avatar Chris Lawton
Browse files

pass through markdown to ensure comment is a fully formed HTML block

parent 2dce0768
No related branches found
No related tags found
No related merge requests found
......@@ -36,7 +36,7 @@
{% endif %}
{% if editable %}
<div class="feed__comment js-comment" data-id="{{activity.id}}" data-comment="{{activity.message|to_markdown}}" data-edit-url="{% url 'funds:api:comments:edit' pk=activity.pk %}">
<div class="feed__comment js-comment" data-id="{{activity.id}}" data-comment="{{activity|display_for:request.user|to_markdown}}" data-edit-url="{% url 'funds:api:comments:edit' pk=activity.pk %}">
{{ activity|display_for:request.user|submission_links|markdown|bleach }}
</div>
......
......@@ -13,4 +13,7 @@ def markdown(value):
@register.filter
def to_markdown(value):
# pass through markdown to ensure comment is a
# fully formed HTML block
value = markdown(value)
return tomd.convert(value)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment