From aab7de0af39b6657cccf6bde89a78022efab3397 Mon Sep 17 00:00:00 2001 From: Alexander_Kabui Date: Fri, 13 Sep 2024 13:12:23 +0300 Subject: refactor: urlencode query string. --- gn2/wqflask/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gn2') diff --git a/gn2/wqflask/views.py b/gn2/wqflask/views.py index f723958a..ec1c2b74 100644 --- a/gn2/wqflask/views.py +++ b/gn2/wqflask/views.py @@ -326,8 +326,8 @@ def gnqna(): @app.route("/editor/edit", methods=["GET"]) @require_oauth2 def edit_gn_doc_file(): - file_path = request.args.get("file-path", "") - response = requests.get(f"http://localhost:8091/edit?file_path={file_path}") + file_path = urllib.parse.urlencode({"file_path": request.args.get("file-path", "")}) + response = requests.get(f"http://localhost:8091/edit?{file_path}") response.raise_for_status() return render_template("gn_editor.html", **response.json()) -- cgit v1.2.3