I think I've found a small bug!
I've been using KM to create some macros for Drafts for Mac beta and discovered that when I Percent Encode for URL any text with
&, I get
& instead of
%26 which is what it is needed for URL schemes to work.
Am I doing something wrong or is this, in fact, a bug?
The code for Percent Encoding for URL currently uses the system API:
As far as I can see, that API ignores the & key and leaves it unencoded (it definitely does not encode it as
& which would be an HTML entity.
That API is now deprecated, quite rightly since (as the comment on the depreciation points out), what exactly should be encoded varies depending on your point of view. So the next version of Keyboard Maestro will use the API:
The question is, what to use for xxx. I think I'll end up encoding everything except alphanumerics, which will include the & character, as well as any other symbols.