commit b03dcd3686c54e90c145634068c1e04c8bd5e2b5
parent 5545ea7847d30e089ae1340a143c3eabe7179e14
Author: Aurimas Vinckevicius <aurimas.dev@gmail.com>
Date: Mon, 29 Jun 2015 17:43:48 -0500
Fix properToProxy converter functions
Regression from 82998e986e079b932b534f97385e96238aefb1be and 9450d0797f648453288b1b59d9daa692dcba7e8a
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/chrome/content/zotero/xpcom/connector/translator.js b/chrome/content/zotero/xpcom/connector/translator.js
@@ -203,7 +203,7 @@ Zotero.Translators = new function() {
} else {
// in Firefox, push the converterFunction
converterFunctions.push(new function() {
- var re = new RegExp('^https?://(?:[^/]\\.)?'+Zotero.Utilities.quotemeta(properHosts[j-1])+'/', "gi");
+ var re = new RegExp('^https?://(?:[^/]\\.)?'+Zotero.Utilities.quotemeta(properHosts[j-1])+'(?=/)', "gi");
var proxyHost = proxyHosts[j-1].replace(/\$/g, "$$$$");
return function(uri) { return uri.replace(re, "$&."+proxyHost) };
});
diff --git a/chrome/content/zotero/xpcom/translation/translator.js b/chrome/content/zotero/xpcom/translation/translator.js
@@ -254,7 +254,7 @@ Zotero.Translators = new function() {
}
} else {
converterFunctions.push(new function() {
- var re = new RegExp('^https?://(?:[^/]+\\.)?'+Zotero.Utilities.quotemeta(properHosts[j-1]+'/'), "gi");
+ var re = new RegExp('^https?://(?:[^/]+\\.)?'+Zotero.Utilities.quotemeta(properHosts[j-1])+'(?=/)', "gi");
var proxyHost = proxyHosts[j-1].replace(/\$/g, "$$$$");
return function(uri) { return uri.replace(re, "$&."+proxyHost) };
});