Skip to content

Files

Latest commit

d2908f5 · Feb 14, 2025

History

History
24 lines (20 loc) · 668 Bytes

Encode_Decode_URL_(AppleScript).md

File metadata and controls

24 lines (20 loc) · 668 Bytes

A pair of AppleScript actions wrapping PHP's urlencode()/urldecode() functions, for quickly unescaping URLs (%20->space, %26->&, etc) in query strings, or escaping a URL so you can paste it into a query string.

Encode URL

using terms from application "Quicksilver"
    on process text theurl
        return do shell script "php -r 'echo urlencode(\"" & theurl & "\");'"
    end process text
end using terms from

Decode URL

using terms from application "Quicksilver"
    on process text theurl
        return do shell script "php -r 'echo urldecode(\"" & theurl & "\");'"
    end process text
end using terms from