From 58f4dc3bb5132c8472f8ac84c44b106e33f9733f Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 14 Apr 2017 22:54:43 -0400 Subject: [PATCH] Unescape HTML in API upload errors --- chrome/content/zotero/xpcom/sync/syncEngine.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chrome/content/zotero/xpcom/sync/syncEngine.js b/chrome/content/zotero/xpcom/sync/syncEngine.js index 23230cc40..f32671659 100644 --- a/chrome/content/zotero/xpcom/sync/syncEngine.js +++ b/chrome/content/zotero/xpcom/sync/syncEngine.js @@ -1104,6 +1104,8 @@ Zotero.Sync.Data.Engine.prototype._uploadObjects = Zotero.Promise.coroutine(func // Handle failed objects for (let index in results.failed) { let { code, message, data } = results.failed[index]; + // API errors are HTML + message = Zotero.Utilities.unescapeHTML(message); let e = new Error(message); e.name = "ZoteroObjectUploadError"; e.code = code;