commit b9837c690d8ad6adf2828e06e8685994b18bfa3f
parent 67b34b14824ca18a3e39543f723b85382d332ccc
Author: Adomas VenĨkauskas <adomas.ven@gmail.com>
Date: Thu, 22 Mar 2018 15:36:52 +0200
Fix item URLs not unproxifying when saving from the connector
Regression from zotero/zotero-connectors#b7a0872
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/proxy.js b/chrome/content/zotero/xpcom/proxy.js
@@ -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]);