Skip to content
Myr

Tiny refactoring

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 · parent eae44e4 · Browse files · 1 file+5 added−9 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+5 added−9 removed

  • other:+5 added−9 removed

1 file+5 added−9 removed

modified:flask.py+5 added-9 removed
45 unmodified lines
46except (ImportError, AttributeError):47 pkg_resources = None484950# figure out if simplejson escapes slashes. This behaviour was changed51# from one version to another without reason.52_json_escapes_slashes = json_available and '\\/' in json.dumps('/')535450class Request(RequestBase):51 """The request object used by default in flask. Remembers the52 matched endpoint and view arguments.53
212 unmodified lines
266 except (KeyError, AttributeError):267 return os.getcwd()268269275if not _json_escapes_slashes:276 def _tojson_filter(string, *args, **kwargs):277 """Calls dumps for the template engine, escaping slashes properly."""270# figure out if simplejson escapes slashes. This behaviour was changed271# from one version to another without reason.272if not json_available or '\\/' not in json.dumps('/'):273 def _tojson_filter(*args, **kwargs):274 if __debug__:275 _assert_have_json()280 return json.dumps(string, *args, **kwargs).replace('/', '\\/')276 return json.dumps(*args, **kwargs).replace('/', '\\/')277else:278 _tojson_filter = json.dumps279280
524 unmodified lines