From 49d3bae25681d4f9956a65e20569204c12a843ff Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 16 Jun 2024 16:30:19 -0400 Subject: [PATCH] Fix Mac Word breakage after 44d9530ec (Which predated HTTP Mac Word integration, so didn't include a change for server_integration.js) --- chrome/content/zotero/xpcom/server_integration.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/server_integration.js b/chrome/content/zotero/xpcom/server_integration.js index 2c0d17df24..80ed79b8b9 100644 --- a/chrome/content/zotero/xpcom/server_integration.js +++ b/chrome/content/zotero/xpcom/server_integration.js @@ -31,8 +31,13 @@ Zotero.Server.Endpoints['/integration/macWordCommand'].prototype = { init: function (data) { // Some dark magic to fix incorrectly encoded unicode characters here // from https://stackoverflow.com/questions/5396560/how-do-i-convert-special-utf-8-chars-to-their-iso-8859-1-equivalent-using-javasc - const document = decodeURIComponent(escape(data.query.document)); - Zotero.Integration.execCommand(data.query.agent, data.query.command, document, data.query.templateVersion); + const document = decodeURIComponent(escape(data.searchParams.get('document'))); + Zotero.Integration.execCommand( + data.searchParams.get('agent'), + data.searchParams.get('command'), + document, + data.searchParams.get('templateVersion') + ); return 200; }, };