Recent changes to for tag (adding empty clause) leave context stack imbalanced when iterable is empty
|Reported by:||Sean Legassick||Owned by:||nobody|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
When the iterable passed to the for tag is empty, the ForNode.render method returns without calling context.pop (which it should as context.push is called previously in the method). The attached patch fixes this and adds code to the template tag regression tests that checks that context stack is left balanced after every tag test.