Disallow attachment.path in web/search translators

This commit is contained in:
Aurimas Vinckevicius 2015-02-04 02:54:13 -06:00
parent 8be83cedec
commit cf9ec26eb4

View file

@ -631,6 +631,13 @@ Zotero.Translate.Sandbox = {
for(var i=0; i<item.attachments.length; i++) { for(var i=0; i<item.attachments.length; i++) {
var attachment = item.attachments[i]; var attachment = item.attachments[i];
// Web translators are not allowed to use attachment.path
if (attachment.path) {
if (!attachment.url) attachment.url = attachment.path;
delete attachment.path;
}
if(attachment.url) { if(attachment.url) {
// Remap attachment (but not link) URLs // Remap attachment (but not link) URLs
attachment.url = translate.resolveURL(attachment.url, attachment.snapshot === false); attachment.url = translate.resolveURL(attachment.url, attachment.snapshot === false);