-
Notifications
You must be signed in to change notification settings - Fork 970
spaces in URLs #10342
Comments
I noticed it as well when opening STR:
Actual result: search result of the URL is displayed Expected result: the URL should be directly opened |
I moved the milestone just in case as this is a regression of the feature that should always pass through general regression tests. |
related issue: if you type 'http://google.com/ abc' into the URL bar, it will go to the URL 'http://google.com/%20abc' instead of interpreting it as a search query like it used to. |
Findings so far (having a really hard time narrowing this down):
I think 0.17.x received a patch which was not copied to 0.18/0.19. I'm doing a diff now to try and find it |
I believe I found the source of the problem. It seems to be this commit: Specifically the replaced code doesn't do the same thing as I was able to "fix" the behavior by applying this patch: diff --git a/app/browser/tabs.js b/app/browser/tabs.js
index a2d897312..fdbb7f681 100644
--- a/app/browser/tabs.js
+++ b/app/browser/tabs.js
@@ -24,6 +24,7 @@ const appStore = require('../../js/stores/appStore')
const appConfig = require('../../js/constants/appConfig')
const siteTags = require('../../js/constants/siteTags')
const {newTabMode} = require('../common/constants/settingsEnums')
+const urlFormat = require('url').format
const {cleanupWebContents, currentWebContents, getWebContents, updateWebContents} = require('./webContentsCache')
const {FilterOptions} = require('ad-block')
const {isResourceEnabled} = require('../filtering')
@@ -320,7 +321,7 @@ const fixDisplayURL = (navigationEntry, controller) => {
navigationEntry.virtualURL = ''
}
- navigationEntry.virtualURL = muon.url.formatForDisplay(navigationEntry.virtualURL)
+ navigationEntry.virtualURL = urlFormat(muon.url.formatForDisplay(navigationEntry.virtualURL))
const parsedURL = muon.url.parse(navigationEntry.virtualURL)
navigationEntry = Object.assign(parsedURL, navigationEntry) @bridiver can you help me look at this? I believe the problem is that |
Code that potentially needs updating: |
if that is the behavior that we want then change |
Awesome, thanks @bridiver! I've got a fix- just need to finish compiling Muon to test it and will PR |
…l problems. Fixes brave/browser-laptop#10342 Auditor: @bridiver
…l problems. Fixes brave/browser-laptop#10342 Auditor: @bridiver
…l problems. Fixes brave/browser-laptop#10342 Auditor: @bridiver
…l problems. Fixes brave/browser-laptop#10342 Auditor: @bridiver
Fixed with brave/muon#274 This won't be available until we get a new Muon build (4.3.10) |
Did you search for similar issues before submitting this one?
Yes
Describe the issue you encountered:
When opening a php link from http://prototiposis.com/hackers/ brave is removing the '%20' and showing spaces in the URL bar. In Brave, this link works fine. However, if you copy the URL (with spaces) an paste it elsewhere (like facebook), the link no longer works because the %20 is missing.
Platform (Win7, 8, 10? macOS? Linux distro?):
macOS
Brave Version (revision SHA):
Brave | 0.18.14
rev | ad92d02
Muon | 4.3.6
Steps to reproduce:
Actual result:
%20s are stripped out so you cannot copy this link into facebook.
Expected result:
%20s are not stripped out (this is how Chrome works)
Will the steps above reproduce in a fresh profile? If not what other info can be added?
Yes
Is this an issue in the currently released version?
Yes
Can this issue be consistently reproduced?
Extra QA steps:
Screenshot if needed:

The text was updated successfully, but these errors were encountered: