Skip to content
Myr

Fix cases where filter input is not a Markup type

Before adoption: this commit came in with the history the project adopted, so no landing records it.

The previous commit assumes that the filter will always be a Markup type, which is not correct.

authored by Erik Johnson · committed by Erik Johnson · parent bfdc846 · Browse files · 1 file+6 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−2 removed

  • other:+6 added−2 removed

1 file+6 added−2 removed

modified:jinja2/filters.py+6 added-2 removed
565 unmodified lines
566 if lines:567 rv += u'\n' + u'\n'.join(568 indention + line if line else line for line in lines569 )570 try:570 # Unescape any strings that were escaped due to concatenation571 rv = Markup(rv.unescape())571 # Unescape any strings that were escaped due to concatenation572 rv = Markup(rv.unescape())573 except AttributeError:574 # s was not a Markup instance575 pass576577 if first:578 rv = indention + rv579
617 unmodified lines