diff --git a/browser/resources/browser_switch/app.ts b/browser/resources/browser_switch/app.ts index c3784d2b6011ab02717b73a6c8a73c66c7b8913c..93240305872c3d30a7f5d2c423b25adfb4410268 100644 --- a/browser/resources/browser_switch/app.ts +++ b/browser/resources/browser_switch/app.ts @@ -145,7 +145,7 @@ function getUrlHostname(url: string): string { const anchor = document.createElement('a'); anchor.href = url; // Return entire url if parsing failed (which means the URL is bogus). - return anchor.hostname || url; + return anchor.hostname || encodeURI(url); } function getProxy(): BrowserSwitchProxy {