commit 48e6eb93de2dfe167b7dbc5c76d44a542df668b7
parent 9fda99ad79e716775f241a54689cf6c1c2c7c7c5
Author: Simon Kornblith <simon@simonster.com>
Date: Mon, 29 Jun 2015 22:27:15 -0400
Merge pull request #779 from aurimasv/proper-to-proxy
Fix properToProxy converter functions
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) };
});