mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 03:46:37 +01:00
handle OPML with empty content, fixes #2495
This commit is contained in:
@@ -3,6 +3,10 @@ const sanitizeHtml = require('sanitize-html');
|
||||
// intended mainly as protection against XSS via import
|
||||
// secondarily it (partly) protects against "CSS takeover"
|
||||
function sanitize(dirtyHtml) {
|
||||
if (!dirtyHtml) {
|
||||
return dirtyHtml;
|
||||
}
|
||||
|
||||
// avoid H1 per https://github.com/zadam/trilium/issues/1552
|
||||
// demote H1, and if that conflicts with existing H2, demote that, etc
|
||||
const transformTags = {};
|
||||
|
||||
Reference in New Issue
Block a user