Skip to content

Commit da99c92

Browse files
committed
Escaping rules has changed in Django 1.9.
Using mark_safe for the template. Fixes sigurdga#61
1 parent ff8631f commit da99c92

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

fileupload/templatetags/upload_tags.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
from django import template
2+
from django.utils.safestring import mark_safe
23

34
register = template.Library()
45

56
@register.simple_tag
67
def upload_js():
7-
return """
8+
return mark_safe("""
89
<!-- The template to display files available for upload -->
910
<script id="template-upload" type="text/x-tmpl">
1011
{% for (var i=0, file; file=o.files[i]; i++) { %}
@@ -73,7 +74,7 @@ def upload_js():
7374
</tr>
7475
{% } %}
7576
</script>
76-
"""
77+
""")
7778

7879

7980

0 commit comments

Comments
 (0)