Skip to content

Commit eb5a1ba

Browse files
authored
fix(client): url encoding slashes (#1214)
1 parent 13ef221 commit eb5a1ba

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

langfuse/_client/client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2249,4 +2249,7 @@ def update_prompt(
22492249
return updated_prompt
22502250

22512251
def _url_encode(self, url: str) -> str:
2252-
return urllib.parse.quote(url)
2252+
# urllib.parse.quote does not escape slashes "/" by default; we need to add safe="" to force escaping
2253+
# we need add safe="" to force escaping of slashes
2254+
# This is necessary for prompts in prompt folders
2255+
return urllib.parse.quote(url, safe="")

0 commit comments

Comments
 (0)