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