Skip to content

Commit

Permalink
Gale Databases: Fix URL-encoded URL for 'multiple' saves
Browse files Browse the repository at this point in the history
https://forums.zotero.org/discussion/93150/zoteros-incorrect-url-metadata-for-eighteenth-century-collections-online-ecco

It looks like a decodeURIComponent() was removed in 6b5e6bb (probably
because it's not actually necessary for single-page saves).
  • Loading branch information
dstillman committed Dec 21, 2021
1 parent be5fc16 commit c70ea0a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Gale Databases.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
"lastUpdated": "2021-07-29 22:40:29"
"lastUpdated": "2021-12-21 04:18:59"
}

/*
Expand Down Expand Up @@ -96,6 +96,8 @@ function doWeb(doc, url) {
function scrape(doc, url) {
let citeData = doc.querySelector('input.citationToolsData');
let documentUrl = citeData.getAttribute('data-url');
// Value is URL-encoded when loaded via processDocuments()
documentUrl = decodeURIComponent(documentUrl);
let mcode = citeData.getAttribute('data-mcode');
let productName = citeData.getAttribute('data-productname');
let docId = mcode ? undefined : citeData.getAttribute('data-docid');
Expand Down

0 comments on commit c70ea0a

Please sign in to comment.