Add root html tags if not present for note insertion
This commit is contained in:
parent
b2b9be381e
commit
36cc18e8cf
1 changed files with 5 additions and 1 deletions
|
@ -1444,9 +1444,13 @@ Zotero.Integration.Session.prototype._processNote = function (item) {
|
||||||
Zotero.logError(e);
|
Zotero.logError(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text = text.replace(/[\u00A0-\u9999\&]/gim, function(i) {
|
// Encode unicode chars
|
||||||
|
text = text.replace(/[\u00A0-\u9999\&]/gim, function (i) {
|
||||||
return '&#'+i.charCodeAt(0)+';';
|
return '&#'+i.charCodeAt(0)+';';
|
||||||
});
|
});
|
||||||
|
if (!text.startsWith('<html>')) {
|
||||||
|
text = `<html><body>${text}</body></html>`;
|
||||||
|
}
|
||||||
return [text, citations, placeholderIDs];
|
return [text, citations, placeholderIDs];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue