Skip to content

Commit

Permalink
Halfway fix for devilry#19
Browse files Browse the repository at this point in the history
Added ng-non-bindable to assignment text in assignments.django.html
which prevents it from being interpreted by AngularJS.
AceMarkdown needs to be fixed as well.
Removed bleach as it was not in use.
  • Loading branch information
Elthan committed Jul 23, 2018
1 parent 774a1fb commit e5fbd41
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions trix/trix_core/trix_markdown.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import markdown
import bleach
from django.utils.safestring import mark_safe


Expand All @@ -20,4 +19,3 @@ def assignment_markdown(inputmarkdown):
'markdown.extensions.tables', # Support tables
])
return mark_safe(md.convert(inputmarkdown))
# mark_safe(bleach.clean(md.convert(inputmarkdown), tags=['p']))
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h2 id="assignment-{{ assignment.id }}">
</div>
{% endif %}

<section class="trix-assignmenttext trix-markdownarticle">
<section class="trix-assignmenttext trix-markdownarticle" ng-non-bindable>
{% trix_assignment_markdown assignment.text %}
</section>
{% if request.user.is_authenticated and not disable_howsolved_box %}
Expand Down

0 comments on commit e5fbd41

Please sign in to comment.