From 0278bf328f3a8b05faf11596296ee164fb38d533 Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 22 Nov 2021 20:59:07 +0100 Subject: [PATCH] support raw-queries with quotes --- copyparty/u2idx.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/copyparty/u2idx.py b/copyparty/u2idx.py index 4d0c6f8e..557c9107 100644 --- a/copyparty/u2idx.py +++ b/copyparty/u2idx.py @@ -117,7 +117,17 @@ class U2idx(object): if ok: continue - v, uq = (uq + " ").split(" ", 1) + if uq.startswith('"'): + v, uq = uq[1:].split('"', 1) + while v.endswith("\\"): + v2, uq = uq.split('"', 1) + v = v[:-1] + '"' + v2 + v2, uq = (uq + " ").split(" ", 1) + v += v2 + else: + v, uq = (uq + " ").split(" ", 1) + v = v.replace('\\"', '"') + if is_key: is_key = False