Skip to content

Fixes #118, #120 Modal body overflow wrap, backslash in body content #119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
7 changes: 5 additions & 2 deletions flask_profiler/flask_profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import functools
import re
import time

import json
from pprint import pprint as pp

import logging
Expand Down Expand Up @@ -123,11 +123,14 @@ def wrapper(*args, **kwargs):
def wrapHttpEndpoint(f):
@functools.wraps(f)
def wrapper(*args, **kwargs):
body = request.data.decode("utf-8", "strict")
if body:
body = json.loads(body)
context = {
"url": request.base_url,
"args": dict(request.args.items()),
"form": dict(request.form.items()),
"body": request.data.decode("utf-8", "strict"),
"body": body,
"headers": dict(request.headers.items()),
"func": request.endpoint,
"ip": request.remote_addr
Expand Down
5 changes: 3 additions & 2 deletions flask_profiler/static/dist/css/main.css

Large diffs are not rendered by default.