Jump to content

External trigger URL handler can't decode `+` signs

Recommended Posts

Posted (edited)

When calling an external trigger with a URL handler `alfred://runtrigger/workflow_id/trigger_id/?argument=test%2B` and passing an argument with a `+` sign, it will always be converted to a blank space, even if escaped to `%2B`.


Alfred 5.5

macOS Sonoma 14.4.1

Edited by saor47
Link to comment
Posted (edited)

Ah, I also ran into that problem a while ago. I dealt with it by base64 encoding the argument before calling the trigger and decoding it on the receiving end.

Here is a quick demo: https://transfer.archivete.am/yjrd8/Demo Base64 External Trigger.alfredworkflow


The shell commands:


echo -n "$1" | base64 
echo -n "$1" | base64 --decode


And I'm just noticing that there actually are Automation Tasks for that already, namely:

- Binary Encode Text > Base64

- Binary Decode Text > Base64

Edited by zeitlings
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...