I've been using Keyboard Maestro to create Things 3 templates successfully without issue for a while now. Unfortunately the changes to v.9 percent encoding seem to have broken my templates.
It looks like Keyboard Maestro is now removing any non-numeric characters (e.g. "/" or ":") when running the percent encode action. Any ideas of how to fix this or is it just a bug?
In the image below you can see at the bottom of the image that it takes the : and / characters and encodes them. Is this not what you want? It doesn't remove them, it encodes them.
I'll be honest with you, I've never used this action before, so you can take my advice with a grain of salt or just ignore me.
No, prior to the V.9 update, KBM left non-alphanumeric characters alone. V.9 introduced parsing them as a feature. I'm hoping there's a way to ignore symbols otherwise all my templates are broken.
You said you don't want it to translate non-alphanumerics. But that's the whole purpose of the action, I thought, to translate non-alphanumerics to URL friendly characters.
If you don't want it to translate ": and "/", what exactly do you want it to translate? I can probably find a solution for you if you tell me what you are trying to do.
Or we can just wait for someone on this website who's better than me at inferring what people want to do. I'm not one of the wizards here, I'm just an average guy.
That's great, several of the people on that thread are the wizards here, and I'm sure they'll have no trouble figuring out what you want the Percent Encode function to do here, since they helped you before.
The intention of the action is to allow you to place fields within URLs.
So it encodes pretty much everything.
The passage quoted from W3 is only refering to the fact that URLs are intended to be ASII only so every non-ASCII character has to be encoded. It is not intended to imply that other characters might also have an impact on the URL and/or may need encoding.
Rather than construct your URL and then encode the whole thing, instead construct the fields of your URL, encode them and then combine them into the URL.
So rather than:
Set URL to “things:///add-project?title=Read %Variable%Title% by %Variable%Author%&deadline=21 days&area=Reading&to-dos=\nRead 10% of %Variable%Title% (%Calculate%Pages*.1%)\nRead 20% of %Variable%Title% (%Calculate%Pages*.2%)\n”
Percent Encode URL
Do something like:
Set Title to “Read %Variable%Title% by %Variable%Author%”
Percent Encode Title
Set Deadline to “21 days”
Percent Encode Deadline
Set ToDos to “\nRead 10% of %Variable%Title% (%Calculate%Pages*.1%)\nRead 20% of %Variable%Title% (%Calculate%Pages*.2%)\n”
Percent Encode ToDos
Set URL to “things:///add-project?title=%Variable%Title%&deadline=%Variable%Deadline%&area=Reading&to-dos=%Variable%ToDos%”
That way the correct characters will be encoded.
Otherwise, with your current technique, if the books have & or = or other characters in them you are going to run in to trouble.
Special characters needing encoding are: ':', '/', '?', '#', '[', ']', '@', '!', '$', '&', "'", '(', ')', '*', '+', ',', ';', '=', as well as '%' itself. ==Other characters don't need to be encoded==, though they could.