How do I keep Safari from replacing a [space] or a dash with %2D?

So I think we can agree that this is a bug with Safari, at least in search. Why it’s doing it with URLs, I don’t know. I will test it with sites other than my own and see what happens.

Are you seeing the actual “search%20for%20anything” text in the Google search box on the results page?

If so, yes - it’s likely a bug of some sort.

If not, and it’s just in the URL, that’s not a bug - it’s how the Internet works. You can’t have spaces in URLs.

ETA: Since this is likely the result of confusion regarding how Safari tries to manage the address bar, go to Safari menu → Settings → Advanced → check “show full website address”.

That should make it more obvious what’s going on.

1 Like

No, I do not agree with that statement. That’s too easy. You seem like you have learned enough to know what you are doing. Pay attention to exactly what you are copying. If it is HTML you will get some “unsafe” characters encoded.

But the hyphen is not an unsafe character, does not need to be encoded, and is never encoded when I use one, which is something I commonly do. Continue to pursue looking at your specific website software and its settings.

You might also try running the well-regarded browser extension StopTheMadness for Safari and other web browsers. I’ve been running it for so long that I almost never think about it and forget that it is there. It is available in the Mac App Store and has removed many annoyances for me. Don’t know if it will help with your issue.

1 Like

I’m not copying anything. I’m typing a search query in, with spaces, and the %20 is being added before the string is sent to Google. Then I get an error. I will continue to test this, but . . .

I agree that something else is going on with the link URLs, and I will look into that with my web site host. I am trying @webwalrus suggestion on Settings, as well.

Thanks, all!

Sorry, but no!
I have this problem also from time to time, but with Safari as well as with Firefox.
The problem seems to be within the responsibility of Google for that, as Google seems not to be able to “translate” this obvious HTML-Code into a search query. This happens only from time to time, but is often at the same time on both of my browsers.
If I use DuckDuckGo at those times instead, I get my results without problems.
I suspect that there is some kind of code running in the Background of Google, that is “translating” the clear text inputs in the search field into the code that could be read by Google, and that is not properly working at those times, when this fails.

1 Like