Bug 1959298 - improve sync entrypoint handling, r=markh

Differential Revision: https://phabricator.services.mozilla.com/D245039
This commit is contained in:
Gijs Kruitbosch
2025-04-24 22:56:11 +00:00
parent a41c51ac84
commit 50daf5cb15

View File

@@ -439,10 +439,10 @@ var gSyncPane = {
},
_getEntryPoint() {
let params = new URLSearchParams(
document.URL.split("#")[0].split("?")[1] || ""
);
return params.get("entrypoint") || "preferences";
let params = URL.fromURI(document.documentURIObject).searchParams;
let entryPoint = params.get("entrypoint") || "preferences";
entryPoint = entryPoint.replace(/[^-.\w]/g, "");
return entryPoint;
},
openContentInBrowser(url, options) {