Commits

Anonymous committed 414be30

A bit better handling of the mark_safe

Comments (0)

Files changed (1)

template_utils/templatetags/generic_markup.py

     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
     else:
-        return mark_safe(smartyPants(value))
+        return smartyPants(value)
 
 register = Library()
 register.filter(apply_markup)