sanitize also clipper content, #1532

This commit is contained in:
zadam
2021-01-14 21:52:44 +01:00
parent cd858a73c1
commit 3f2e8717b3
5 changed files with 124 additions and 146 deletions

View File

@@ -30,14 +30,14 @@ function importEnex(taskContext, file, parentNote) {
: file.originalname;
// root note is new note into all ENEX/notebook's notes will be imported
const rootNote = (noteService.createNewNote({
const rootNote = noteService.createNewNote({
parentNoteId: parentNote.noteId,
title: rootNoteTitle,
content: "",
type: 'text',
mime: 'text/html',
isProtected: parentNote.isProtected && protectedSessionService.isProtectedSessionAvailable(),
})).note;
}).note;
function extractContent(content) {
const openingNoteIndex = content.indexOf('<en-note>');

View File

@@ -9,7 +9,6 @@ const attributeService = require('../../services/attributes');
const Branch = require('../../entities/branch');
const path = require('path');
const commonmark = require('commonmark');
const TaskContext = require('../task_context.js');
const protectedSessionService = require('../protected_session');
const mimeService = require("./mime");
const treeService = require("../tree");