Fix properToProxy converter functions

Regression from 82998e986e and 9450d0797f
This commit is contained in:
Aurimas Vinckevicius 2015-06-29 17:43:48 -05:00
parent 5545ea7847
commit b03dcd3686
2 changed files with 2 additions and 2 deletions

View file

@ -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) };
});

View file

@ -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) };
});