commit cf9ec26eb4f518ecbe48a4b89d7af2a1b9e2cda7
parent 8be83cedec1d1b9df63b2a1abdb4a0afb1ef69dc
Author: Aurimas Vinckevicius <aurimas.dev@gmail.com>
Date: Wed, 4 Feb 2015 02:54:13 -0600
Disallow attachment.path in web/search translators
Diffstat:
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js
@@ -631,6 +631,13 @@ Zotero.Translate.Sandbox = {
for(var i=0; i<item.attachments.length; 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) {
// Remap attachment (but not link) URLs
attachment.url = translate.resolveURL(attachment.url, attachment.snapshot === false);