AlphacrucisCollege / django-template-utils

Fork of (abandoned?) package used in ac.edu.au. Exported via GoogleCodeExport.
https://bitbucket.org/ubernostrum/django-template-utils
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Escaped Output with apply_markup #15

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I don't know if I'm doing it wrong, but when I use the apply_markup filter
in a Django template, the output has escaped HTML entities.  In
apply_markup (templatetags/generic_markup.py), wrapping the
formatter(value) in with mark_safe() fixed this.  If there are arguments
this is already done; I am not sure what the difference is here.  Shouldn't
they both be marked as safe so as not to have the output escaped?  Also, if
I understand correctly, using mark_safe means you don't need to attach the
is_safe attribute to the function.

if arg is not None:
    return mark_safe(formatter(value, filter_name=arg))
return mark_safe(formatter(value))

Original issue reported on code.google.com by joel.kit...@gmail.com on 18 May 2008 at 5:11

GoogleCodeExporter commented 8 years ago
Fixed this and another minor one in revision 109.

Original comment by ubernost...@gmail.com on 3 Jul 2008 at 4:42

GoogleCodeExporter commented 8 years ago
Thanks!

Original comment by joel.kit...@gmail.com on 3 Jul 2008 at 4:13