1. James Bennett
  2. django-template-utils


ubernostrum  committed 414be30

A bit better handling of the mark_safe

  • Participants
  • Parent commits 38d7508
  • Branches default

Comments (0)

Files changed (1)

File template_utils/templatetags/generic_markup.py

View file
     if arg is not None:
         return mark_safe(formatter(value, filter_name=arg))
     return formatter(value)
+apply_markup.is_safe = True
 def smartypants(value):
     except ImportError:
         if settings.DEBUG:
             raise template.TemplateSyntaxError("Error in smartypants filter: the Python smartypants module is not installed or could not be imported")
-        return mark_safe(value)
+        return value
-        return mark_safe(smartyPants(value))
+        return smartyPants(value)
 register = Library()