Skip to content

Commit

Permalink
Unescape HTML in API upload errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dstillman committed Apr 15, 2017
1 parent 0920e25 commit 58f4dc3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions chrome/content/zotero/xpcom/sync/syncEngine.js
Expand Up @@ -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;
Expand Down

0 comments on commit 58f4dc3

Please sign in to comment.