Accessing URL-encoded text in AppleScript action via {popclip urlencoded text}

I have an extension like this

and found that {popclip text} is not URL-encoded. As a result, when user select some text starting with #, text is empty, because # is seen as a separator.

Intially I used Open URL action, but switched to AppleScript because it can open the app even if it’s not launched.

Is there a way to write the extension to achieve both (encoding URL, launch app)?

1 Like

{popclip text} is only automatically URL-encoded in an Open URL action . In an AppleScript action, as it’s just the raw string. For the encoded version you can use {popclip urlencoded text} as per Script variables.

1 Like

Thank you so much! didn’t know urlencoded exists

1 Like

And I spend hours and hours writing those docs :cry: :wink:

1 Like