Drop "0-" before the URL on III proxies before attempting subdomain dropping for connectors

This commit is contained in:
Simon Kornblith 2012-07-30 19:20:44 -04:00
parent 80d98e0bcb
commit 3a3efbc430

View File

@ -158,7 +158,10 @@ Zotero.Translators = new function() {
var properHosts = [];
var proxyHosts = [];
if(m) {
var hostnames = m[2].split(".");
// First, drop the 0- if it exists (this is an III invention)
var host = m[2];
if(host.substr(0, 2) === "0-") host = substr(2);
var hostnames = host.split(".");
for(var i=1; i<hostnames.length-2; i++) {
if(TLDS[hostnames[i].toLowerCase()]) {
var properHost = hostnames.slice(0, i+1).join(".");