mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 13:26:01 +01:00
add HTML header with UTF-8 meta encoding declaration to exported HTML files, fixes #384
This commit is contained in:
@@ -20,6 +20,10 @@ async function exportSingleNote(branch, format, res) {
|
||||
|
||||
if (note.type === 'text') {
|
||||
if (format === 'html') {
|
||||
if (!note.content.toLowerCase().includes("<html")) {
|
||||
note.content = '<html><head><meta charset="utf-8"></head><body>' + note.content + '</body></html>';
|
||||
}
|
||||
|
||||
payload = html.prettyPrint(note.content, {indent_size: 2});
|
||||
extension = 'html';
|
||||
mime = 'text/html';
|
||||
|
||||
Reference in New Issue
Block a user