mirror of
https://github.com/zotero/zotero.git
synced 2026-10-05 02:43:38 +00:00
Fix http word integration word path unicode issues.
This commit is contained in:
parent
9c9936a88a
commit
32e50d89be
1 changed files with 4 additions and 1 deletions
|
|
@ -29,7 +29,10 @@ Zotero.Server.Endpoints['/integration/macWordCommand'].prototype = {
|
|||
supportedDataTypes: ["application/json"],
|
||||
permitBookmarklet: true,
|
||||
init: function (data) {
|
||||
Zotero.Integration.execCommand(data.query.agent, data.query.command, data.query.document, data.query.templateVersion);
|
||||
// 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);
|
||||
return 200;
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue