Skip to content
Myr

Merge branch '2.9-maintenance'

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

authored by Armin Ronacher · committed by Armin Ronacher · parents 5828b8b, d117425 · Browse files · 4 files+17 added−4 removed
This commit

State

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

Diff stats

4 files+17 added−4 removed

  • tests:+3 added−2 removed
  • other:+14 added−2 removed

4 files+17 added−4 removed

modified:jinja2/debug.py+1 added-1 removed
196 unmodified lines
197198def get_jinja_locals(real_locals):199 ctx = real_locals.get('context')200 if ctx:201 locals = ctx.get_all()201 locals = ctx.get_all().copy()202 else:203 locals = {}204205 local_overrides = {}
167 unmodified lines
modified:jinja2/utils.py+1 added-1 removed
565 unmodified lines
566 .replace(u'<', u'\\u003c') \567 .replace(u'>', u'\\u003e') \568 .replace(u'&', u'\\u0026') \569 .replace(u"'", u'\\u0027')570 return rv570 return Markup(rv)571572573@implements_iterator574class Cycler(object):
73 unmodified lines
modified:tests/test_filters.py+3 added-2 removed
638 unmodified lines
639640 def test_json_dump(self):641 env = Environment(autoescape=True)642 t = env.from_string('{{ x|tojson }}')643 assert t.render(x={'foo': 'bar'}) == '{&#34;foo&#34;: &#34;bar&#34;}'644 assert t.render(x='"bar\'') == r'&#34;\&#34;bar\u0027&#34;'643 assert t.render(x={'foo': 'bar'}) == '{"foo": "bar"}'644 assert t.render(x='"ba&r\'') == r'"\"ba\u0026r\u0027"'645 assert t.render(x='<bar>') == r'"\u003cbar\u003e"'646647 def my_dumps(value, **options):648 assert options == {'foo': 'bar'}649 return '42'
3 unmodified lines
modified:CHANGES+12 added
39 unmodified lines
40.. _#665: https://github.com/pallets/jinja/pull/66541.. _#685: https://github.com/pallets/jinja/pull/68542.. _#692: https://github.com/pallets/jinja/pull/6924344Version 2.9.745-------------4647(bugfix release, in development)4849- ``tojson`` filter marks output as safe to match documented behavior.50 (`#718`_)51- Resolved a bug where getting debug locals for tracebacks could52 modify template context.5354.. _#718: https://github.com/pallets/jinja/pull/7185556Version 2.9.657-------------58(bugfix release, released on April 3rd 2017)59
503 unmodified lines