makinacorpus / django-templatetag-handlebars

Easily embed Handlebars.js templates in your django templates
GNU Lesser General Public License v3.0
48 stars 21 forks source link

Django 1.11 and newer requires mark_safe() on template tag results #9

Open jfroejk opened 6 years ago

jfroejk commented 6 years ago

I have seen the problem in templatetag_handlebars.js:handlebars_js(). Without mark_safe() it's output is quoted and appears as text in the pages using the tag. Corrected version:

@register.simple_tag def handlebars_js(): return mark_safe("""""" % settings.STATIC_URL)