Fix item URLs not unproxifying when saving from the connector

Regression from zotero/zotero-connectors#b7a0872
This commit is contained in:
Adomas Venčkauskas 2018-03-22 15:36:52 +02:00
parent 67b34b1482
commit b9837c690d

View file

@ -321,7 +321,11 @@ Zotero.Proxy.prototype.compileRegexp = function() {
})
// now replace with regexp fragment in reverse order
var re = "^"+Zotero.Utilities.quotemeta(this.scheme)+"$";
if (this.scheme.includes('://')) {
re = "^"+Zotero.Utilities.quotemeta(this.scheme)+"$";
} else {
re = "^https?"+Zotero.Utilities.quotemeta('://'+this.scheme)+"$";
}
for(var i=this.parameters.length-1; i>=0; i--) {
var param = this.parameters[i];
re = re.replace(Zotero_Proxy_schemeParameterRegexps[param], "$1"+parametersToCheck[param]);