From 957c95e3787dc50f1390ca29f9374035a526b201 Mon Sep 17 00:00:00 2001 From: swee Date: Mon, 13 Jan 2025 22:09:09 -0800 Subject: [PATCH] Update server.py --- server.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server.py b/server.py index c62088e..cc3b3eb 100644 --- a/server.py +++ b/server.py @@ -126,6 +126,7 @@ def relay(): tempurl = url + goto else: tempurl = "/".join(url.split("/")[:-1]) + "/" + goto + tempurl = quote(tempurl, safe='') goto = f"/gem?gemini={tempurl}" elif prse.scheme != "gemini": extra = "" @@ -135,12 +136,12 @@ def relay(): extra = "" extracomment = f"This link points to an address that isn't from the server you're currently connecting to ({prse.hostname})" goto = goto.replace("gemini://", "") + goto = quote(goto, safe='') goto = f"/gem?gemini={goto}" if temp.split(" ") == 1: comment = goto else: comment = " ".join(temp.split(" ")[1:]) - goto = quote(goto, safe='') code += f"

{comment} {extra}

\n" elif i[0:2] == "> ": code += f"

{i}

\n"