How to stop query spaces being converted to %20 which causes search to fail

I am getting started with Keyboard maestro by trying to create a keyboard shortcut to search wikipedia. How do I stop spaces in my query from being converted to %20?

Have you tried changing spaces to "+"s before URL encoding? (IIRC, that's what a basic Wikipedia search uses when you put space-separated words into the search box.)

Otherwise, post your macro so that people can see what's going on.

What specifically are you doing?

Spaces are not legal in URLs.

he’s trying to search for, e.g “Alfred the Great” and is sending “Alfred%29the%20Great” instead and wikipedia doesn[t like that.

The answer is what Nice_S suggested, replace space with ‘’+’

s| +|\+| (in sed-speak)

1 Like