0

Django urlize docs say:

The urlize filter also takes an optional parameter autoescape. If autoescape is True, the link text and URLs will be escaped using Django's built-in escape filter. The default value for autoescape is True.

I'd like to use this parameter, but the documentation says nothing about how to actually pass a keyword argument to a template filter. Is it possible, and if so, how do I do that?

che
  • 12,097
  • 7
  • 42
  • 71

1 Answers1

1

Apparently urlize gets that keyword argument from current autoescape settings, so the way to go seems like

{% autoescape off %}{{ value|force_escape|urlize }}{% endautoescape %}

(if you still want to escape the value)

che
  • 12,097
  • 7
  • 42
  • 71