@@ -191,7 +191,7 @@ def iriencode(value):
191191
192192@register .filter (is_safe = True , needs_autoescape = True )
193193@stringfilter
194- def linenumbers (value , autoescape = None ):
194+ def linenumbers (value , autoescape = True ):
195195 """Displays text with line numbers."""
196196 lines = value .split ('\n ' )
197197 # Find the maximum width of the line count, for use with zero padding
@@ -353,14 +353,14 @@ def urlencode(value, safe=None):
353353
354354@register .filter (is_safe = True , needs_autoescape = True )
355355@stringfilter
356- def urlize (value , autoescape = None ):
356+ def urlize (value , autoescape = True ):
357357 """Converts URLs in plain text into clickable links."""
358358 return mark_safe (_urlize (value , nofollow = True , autoescape = autoescape ))
359359
360360
361361@register .filter (is_safe = True , needs_autoescape = True )
362362@stringfilter
363- def urlizetrunc (value , limit , autoescape = None ):
363+ def urlizetrunc (value , limit , autoescape = True ):
364364 """
365365 Converts URLs into clickable links, truncating URLs to the given character
366366 limit, and adding 'rel=nofollow' attribute to discourage spamming.
@@ -457,7 +457,7 @@ def force_escape(value):
457457
458458@register .filter ("linebreaks" , is_safe = True , needs_autoescape = True )
459459@stringfilter
460- def linebreaks_filter (value , autoescape = None ):
460+ def linebreaks_filter (value , autoescape = True ):
461461 """
462462 Replaces line breaks in plain text with appropriate HTML; a single
463463 newline becomes an HTML line break (``<br />``) and a new line
@@ -469,7 +469,7 @@ def linebreaks_filter(value, autoescape=None):
469469
470470@register .filter (is_safe = True , needs_autoescape = True )
471471@stringfilter
472- def linebreaksbr (value , autoescape = None ):
472+ def linebreaksbr (value , autoescape = True ):
473473 """
474474 Converts all newlines in a piece of plain text to HTML line breaks
475475 (``<br />``).
@@ -552,7 +552,7 @@ def first(value):
552552
553553
554554@register .filter (is_safe = True , needs_autoescape = True )
555- def join (value , arg , autoescape = None ):
555+ def join (value , arg , autoescape = True ):
556556 """
557557 Joins a list with a string, like Python's ``str.join(list)``.
558558 """
@@ -622,7 +622,7 @@ def slice_filter(value, arg):
622622
623623
624624@register .filter (is_safe = True , needs_autoescape = True )
625- def unordered_list (value , autoescape = None ):
625+ def unordered_list (value , autoescape = True ):
626626 """
627627 Recursively takes a self-nested list and returns an HTML unordered list --
628628 WITHOUT opening and closing <ul> tags.
0 commit comments