]> git.ipfire.org Git - thirdparty/jinja.git/commit
Fix bug with when using Markup on ChainableUndefined 1047/head
authorLaurence de Bruxelles <lfdebrux@gmail.com>
Sat, 10 Aug 2019 21:08:39 +0000 (22:08 +0100)
committerDavid Lord <davidism@gmail.com>
Fri, 4 Oct 2019 20:06:12 +0000 (13:06 -0700)
commit8afc7e57c94bca530c0094e3cdbdbd8b4a1a5541
treeb0f2747e9e29dbc2630ea546226a26a7803344e7
parente68d9b870536d1d019b6f26750d4c68a89df25e3
Fix bug with when using Markup on ChainableUndefined

Wrapping a ChainableUndefined object with Markup causes an
UndefinedError because Markup thinks that ChainableUndefined has an
attribute called __html__ and tries to call it.

This commit fixes this by defining a method __html__ that calls
ChainableUndefined.__str__. We also add a regression test.
jinja2/runtime.py
tests/test_regression.py