We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab48a49 commit 891c003Copy full SHA for 891c003
tests/filters/test_default_if_none.py
@@ -70,6 +70,18 @@ def test_default_if_none_preserves_html_safe_value(assert_render):
70
"<b>default</b>",
71
id="autoescape_html_default_variable",
72
),
73
+ pytest.param(
74
+ "{% autoescape off %}{{ value|default_if_none:'default' }}{% endautoescape %}",
75
+ {"value": "<b>html</b>"},
76
+ "<b>html</b>",
77
+ id="autoescape_html_value",
78
+ ),
79
80
+ "{% autoescape off %}{{ value|default_if_none:default }}{% endautoescape %}",
81
+ {"value": None, "default": "<b>default</b>"},
82
+ "<b>default</b>",
83
+ id="autoescape_html_default_variable",
84
85
pytest.param(
86
"{{ value|default_if_none:'<b>default</b>'|escape }}",
87
{"value": None},
0 commit comments