From 6ade0c3bd4c262cce1b1f42a17ae2163ea803c16 Mon Sep 17 00:00:00 2001 From: geeseven <2334728+geeseven@users.noreply.github.com> Date: Sat, 2 Jan 2021 06:29:54 -0600 Subject: encode URL when checking if it has been bookmarked URLs with '#' were not getting identified correctly when getting checked. Encoding the URL fixes this. --- misc/userscripts/add-nextcloud-bookmarks | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/userscripts/add-nextcloud-bookmarks b/misc/userscripts/add-nextcloud-bookmarks index 4e66620dc..cace1fd32 100755 --- a/misc/userscripts/add-nextcloud-bookmarks +++ b/misc/userscripts/add-nextcloud-bookmarks @@ -42,7 +42,7 @@ from os import environ, path from sys import argv, exit from PyQt5.QtWidgets import QApplication, QInputDialog, QLineEdit -from requests import get, post +from requests import get, post, utils from requests.auth import HTTPBasicAuth @@ -125,7 +125,7 @@ auth = HTTPBasicAuth(settings["user"], settings["password"]) # check if there is already a bookmark for the URL r = get( - "{}?url={}".format(api_url, QUTE_URL), + "{}?url={}".format(api_url, utils.quote(QUTE_URL, safe="")), auth=auth, headers=headers, timeout=(3.05, 27), -- cgit v1.2.3-54-g00ecf