Fix Mac Word breakage after 44d9530ec

(Which predated HTTP Mac Word integration, so didn't include a change
for server_integration.js)
This commit is contained in:
Dan Stillman 2024-06-16 16:30:19 -04:00
parent 137a1ddcc0
commit 49d3bae256

View file

@ -31,8 +31,13 @@ Zotero.Server.Endpoints['/integration/macWordCommand'].prototype = {
init: function (data) { init: function (data) {
// Some dark magic to fix incorrectly encoded unicode characters here // 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 // 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)); const document = decodeURIComponent(escape(data.searchParams.get('document')));
Zotero.Integration.execCommand(data.query.agent, data.query.command, document, data.query.templateVersion); Zotero.Integration.execCommand(
data.searchParams.get('agent'),
data.searchParams.get('command'),
document,
data.searchParams.get('templateVersion')
);
return 200; return 200;
}, },
}; };