diff --git a/src/services/import/markdown.spec.ts b/src/services/import/markdown.spec.ts index 2a7330091..f3f9515f8 100644 --- a/src/services/import/markdown.spec.ts +++ b/src/services/import/markdown.spec.ts @@ -127,4 +127,10 @@ second line 2
It's important to note that these examples are not natively supported by Trilium out of the box; instead, they demonstrate what you can build within Trilium.
`; + expect(markdownService.renderToHtml(input, "Title")).toStrictEqual(expected); + }); + }); diff --git a/src/services/import/markdown.ts b/src/services/import/markdown.ts index aa714d253..95ff3b124 100644 --- a/src/services/import/markdown.ts +++ b/src/services/import/markdown.ts @@ -82,7 +82,7 @@ function renderToHtml(content: string, title: string) { // h1 handling needs to come before sanitization html = importUtils.handleH1(html, title); - // html = htmlSanitizer.sanitize(html); + html = htmlSanitizer.sanitize(html); // Remove slash for self-closing tags to match CKEditor's approach. html = html.replace(/<(\w+)([^>]*)\s+\/>/g, "<$1$2>");