diff options
author | Alexander_Kabui | 2024-09-13 13:12:23 +0300 |
---|---|---|
committer | Alexander_Kabui | 2024-09-13 13:12:23 +0300 |
commit | aab7de0af39b6657cccf6bde89a78022efab3397 (patch) | |
tree | bb77eb524f3ed8667d32790b88e9a7239fc58785 | |
parent | 5c2664c56e13636f61a87f9ddb39aa55661310e4 (diff) | |
download | genenetwork2-aab7de0af39b6657cccf6bde89a78022efab3397.tar.gz |
refactor: urlencode query string.
-rw-r--r-- | gn2/wqflask/views.py | 4 |
1 files changed, 2 insertions, 2 deletions
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()) |