Skip to content
Snippets Groups Projects
Commit 9bb86577 authored by Andreas Domanowski's avatar Andreas Domanowski
Browse files

Replace string replacing with urllib quote replacer

parent 43ba5129
No related branches found
No related tags found
1 merge request!1Hedgedoc import
......@@ -10,7 +10,7 @@ from zipfile import ZipFile
def import_single_document(instance_url, hedgedoc_free_url, content, session_id):
sanitized_free_url = hedgedoc_free_url.replace(" ", "%20")
sanitized_free_url = urllib.parse.quote(hedgedoc_free_url)
request_url = instance_url + '/new/' + sanitized_free_url
headers = {"Cookie": f"connect.hedgeDoc.sid={session_id}", "Content-Type": "text/markdown"}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment