diff --git a/chrome/content/zotero/preferences/preferences_sync.jsx b/chrome/content/zotero/preferences/preferences_sync.jsx index bd1b94e560..b85436b4f4 100644 --- a/chrome/content/zotero/preferences/preferences_sync.jsx +++ b/chrome/content/zotero/preferences/preferences_sync.jsx @@ -499,8 +499,8 @@ Zotero_Preferences.Sync = { var newProtocol = Zotero.Prefs.get('sync.storage.protocol'); var newURL = Zotero.Prefs.get('sync.storage.url').trim() - // Strip scheme and '/zotero' - .replace(/(^https?:\/\/|\/zotero\/?$|\/$)/g, '') + // Strip scheme, leading '://' or '//' (#3483), and trailing '/zotero' + .replace(/(^https?:\/\/|^:?\/\/|\/zotero\/?$|\/$)/g, '') Zotero.Prefs.set('sync.storage.url', newURL); if (oldProtocol != newProtocol || oldURL != newURL) {