BUG? PLEG lua event -> problem passing literal argument

I define in the PLEG startup lua a function like this:

[code]
pushoverUserID = “redacted”
pushoverAccessToken = “redacted”

– Send Pushover Message
function plegPushoverAlert(message, sound)
os.execute(“curl -k https://api.pushover.net/1/messages.json -d token=”…pushoverAccessToken…" -d user=“…pushoverUserID…” -d message=“…message…” -d priority=1 -d sound="…sound,1)
end[/code]

and call the function in a Logic Action like this:

plegPushoverAlert("Pool Pump Off", "default")

but the Pushover message I receive only contains the word “Pool”

inserting non whitespace like this:

plegPushoverAlert("Pool_Pump_Off", "default")

I get all that text…

Is there some known bug or expected behavior of lua?

I figured this out…

I enter the text like this:

plegPushoverAlert("Pool%20Pump%20Off", "default")

the curl command needs to be URL encoded…