commit 58f4dc3bb5132c8472f8ac84c44b106e33f9733f
parent 0920e25393e90f07eaeffc3a5bf282803e0957ab
Author: Dan Stillman <dstillman@zotero.org>
Date: Fri, 14 Apr 2017 22:54:43 -0400
Unescape HTML in API upload errors
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git 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;