Don't URL-encode most characters in DOIs when opening/copying as link
Only #, ?, and % are now encoded. Addresses #295
This commit is contained in:
parent
98d2b69020
commit
782c2a1d15
1 changed files with 5 additions and 1 deletions
|
@ -428,7 +428,11 @@
|
|||
// Pull out DOI, in case there's a prefix
|
||||
var doi = Zotero.Utilities.cleanDOI(val);
|
||||
if (doi) {
|
||||
doi = "https://doi.org/" + encodeURIComponent(doi);
|
||||
doi = "https://doi.org/"
|
||||
// Encode some characters. '/' doesn't need to be encoded
|
||||
+ doi.replace(/#/g, '%23')
|
||||
.replace(/\?/g, '%3f')
|
||||
.replace(/%/g, '%25');
|
||||
label.classList.add("pointer");
|
||||
label.setAttribute("onclick", "ZoteroPane_Local.loadURI('" + doi + "', event)");
|
||||
label.setAttribute("tooltiptext", Zotero.getString('locate.online.tooltip'));
|
||||
|
|
Loading…
Reference in a new issue