A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
core: fix invalid html results in empty note
Ammar Ahmed51b226226eeb
diff --git a/packages/core/src/utils/html-parser.ts b/packages/core/src/utils/html-parser.tsindex 4ce7e83f5..d3774f522 100644--- a/packages/core/src/utils/html-parser.ts+++ b/packages/core/src/utils/html-parser.ts@@ -30,7 +30,12 @@ export const parseHTML = (input: string) =>: null;export const sanitizeHtml = (html: string): string => {+ if (!isHtmlValid(html)) {+ return wrapInCodeBlock(html);+ }+const inputHtml = normalizeToHtmlBody(html);+return getDomPurify().sanitize(inputHtml, {RETURN_DOM: false,ADD_TAGS: ["iframe"]