Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Safari replaces space with %20 in search bar

As stated in topic, if I try to search for something in address bar, it's quite likely that space get replaced with %20 and Safari Failed to open page.

For example, if I type search in safari, I expect to get a Google result of "search in Safari", but I get http://search%20in%20safari/

It doesn't happen all the time, now and then it decides to do this for several minutes. How to turn this feature off?


Safari Version 10.1.1 (12603.2.4)

MacBook Air, macOS Sierra (10.12.5)

Posted on Jun 11, 2017 8:38 AM

Reply
Question marked as Best reply

Posted on Jun 12, 2017 11:00 AM

The bug is alive and well. When you type something in the address bar, safari will attempt to tell if it is a search or an URL. If it's a search, safari will show --<span style="color: blue;">search Google</span>. If Safari thinks its an URL, then it will escape the invalid characters. Problem is safari has trouble telling if it's search or URL.


Try putting this in address bar http://a b


Chrome, Opera will think it's search string and go to Google. While safari will escape the space and not find page. Haven't tested other browsers.


That example is very artificial. What happens in my case, I guess, is that Safari sometimes adds "http://" to my search term then classify it as URL. But I don't have a reliable way to replicate the behavior.

5 replies
Question marked as Best reply

Jun 12, 2017 11:00 AM in response to Eric Root

The bug is alive and well. When you type something in the address bar, safari will attempt to tell if it is a search or an URL. If it's a search, safari will show --<span style="color: blue;">search Google</span>. If Safari thinks its an URL, then it will escape the invalid characters. Problem is safari has trouble telling if it's search or URL.


Try putting this in address bar http://a b


Chrome, Opera will think it's search string and go to Google. While safari will escape the space and not find page. Haven't tested other browsers.


That example is very artificial. What happens in my case, I guess, is that Safari sometimes adds "http://" to my search term then classify it as URL. But I don't have a reliable way to replicate the behavior.

Jun 11, 2017 4:19 PM in response to wkenmomo

Safari/Preferences/Advanced - enable the Develop menu, then go there and Empty Caches. Quit/reopen Safari and test. Then try Safari/History/Show History and delete all history items. Quit/reopen Safari and test. You can also try try Safari/Clear History…. The down side is it clears all cookies. Doing this may cause some sites to no longer recognize your computer as one that has visited the web site. Go to Finder and select your user/home folder. With that Finder window as the front window, either select Finder/View/Show View options or go command - J. When the View options opens, check ’Show Library Folder’. That should make your user library folder visible in your user/home folder. Select Library/Caches/com.apple.Safari/Cache.db and move it to the trash.


Go to Safari Preferences/Extensions and turn all extensions off. Test. If okay, turn the extensions on one by one until you figure out what extension is causing the problem.


Safari Corruption See post by Linc Davis


Safari Reset


If that doesn't work, try running this program in your normal account , then copy and paste the output in a reply. The program was created by etresoft, a frequent contributor. Please use copy and paste as screen shots can be hard to read. On the screen with Options, please open Options and check the bottom 2 boxes before running. Click “Share Report” button in the toolbar, select “Copy Report” and then paste into a reply. This will show what is running on your computer. No personal information is shown.

Etrecheck – System Information

Safari replaces space with %20 in search bar

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.