Google search on iOS using firefox

Hi,
Newbie script question. I’d like modify action “google search” to use firefox on iOS instead of Safari.

I’ve tried with an URL-step: firefox://open-url?url=https://www.google.com/search?q=[[selection]] but it only opens a new window in firefox.

If I instead use the following URL-step firefox://open-url?url=https://www.google.com/search?q=searchforthistext it works as intended.

There seems to be some kind of encoding problem, but I don’t know how to fix it.

I don’t have Firefox to try it with, but perhaps try this?

firefox://open-url?url=https%3A%2F%2Fwww.google.com%2Fsearch%3Fq%3D[[selection]]

Thanks, but that didn’t work. Log says “invalid url”.

Firefox documentation has this example:
firefox://open-url?url=https://www.google.com/search%3Fq%3Dfirefox%2520for%2520ios which works.

But when I try this action firefox://open-url?url=https://www.google.com/search%3Fq%3D%[[selection]]
I get
firefox://open-url?url=https://www.google.com/search%3Fq%3DFirefox%20for%20iOS

The example seems to encode space as %2520 instead of just %20. How can I accomplish that?