Skip to content

Commit

Permalink
Note HTML: Add missing charset meta (zotero#2799)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtcode authored Mar 16, 2022
1 parent cb1d062 commit b18eeac
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Note HTML.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"inRepository": true,
"translatorType": 2,
"lastUpdated": "2021-11-29 17:00:00"
"lastUpdated": "2022-03-16 12:00:00"
}

/*
Expand Down Expand Up @@ -95,5 +95,9 @@ function doExport() {
// OO gets it right, so this results in an extra indent
ZU.xpath(doc, '//blockquote/p').forEach(p => p.style.marginLeft = '30px');

let charsetMeta = doc.createElement('meta');
charsetMeta.setAttribute('charset', 'utf-8');
doc.head.append(charsetMeta);

Zotero.write('<!DOCTYPE html>' + doc.documentElement.outerHTML);
}

0 comments on commit b18eeac

Please sign in to comment.