Replies: 2 comments 1 reply
-
just a blind shot, did you try escaping with |
Beta Was this translation helpful? Give feedback.
1 reply
-
I tested with the local bot API server to circumvent urrlib, it worked there. So I am afraid this is somewhere there in how urrlib translates fields (https://github.com/python-telegram-bot/urllib3/blob/1954df03958b164483282330b3a58092c070bc7a/urllib3/request.py#L72). Im not awake enough today to further hunt this issue down, but I am sure it happens in this function or in one of the ones it calls. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone!
I am trying to get the bot to send a file into a chat. This worked well so far.
But i want to use a filename which contains
'
.The string looks fine in python before i pass it, but in the filename of the file, which the bot sends into the chat, the
'
is replaced by a space or removed. I tried all types of escaping which came to my mind but nothing worked.filename = "test" + "'" + "test" + "''" + ".test"
bot.send_document(chat_id, document=file_object, filename=filename)
results into a file with the name
test test.test
What can i do?
Beta Was this translation helpful? Give feedback.
All reactions