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"