From eb2f1410c89a9d3fc9adb770a41e30e71cb12564 Mon Sep 17 00:00:00 2001 From: Shy Date: Wed, 28 Aug 2024 13:38:27 +0200 Subject: [PATCH] Use single quotes in curl command line --- c4mate | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/c4mate b/c4mate index 8845b30..8632ef1 100755 --- a/c4mate +++ b/c4mate @@ -52,14 +52,14 @@ function MatePad:fetch(api, data) if data ~= nil then local flags = "" for k, v in pairs(data) do - flags = string.format("%s --data-urlencode \"%s=%s\"", flags, k, v) + flags = string.format("%s --data-urlencode '%s=%s'", flags, k, v) end curl = io.popen(string.format( - "curl %s --cookie \"%s\" --cookie-jar \"%s\" %s \"%s/%s\"", + "curl %s --cookie '%s' --cookie-jar '%s' %s '%s/%s'", self.CURL_FLAGS, self.COOKIE_JAR, self.COOKIE_JAR, flags, self.HOST, api)) else curl = io.popen(string.format( - "curl %s --cookie \"%s\" --cookie-jar \"%s\" \"%s/%s\"", + "curl %s --cookie '%s' --cookie-jar '%s' '%s/%s'", self.CURL_FLAGS, self.COOKIE_JAR, self.COOKIE_JAR, self.HOST, api)) end responce = curl:read("a")