Skip to content

Commit 0314dc0

Browse files
committed
fix: translate any special char into ascii code
1 parent f99ae4d commit 0314dc0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lexical/lexical.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export class LexicalModule {
9999
tableRow: 'editor-table-row',
100100
} satisfies RegisteredStyleMap,
101101
});
102-
const parsed = JSON.parse(lexicalContent);
102+
const parsed = JSON.parse(lexicalContent.replaceAll('<', '&#60;').replaceAll('>', '&#62;'));
103103
editor.setEditorState(editor.parseEditorState(parsed));
104104
editor.read(() => (html = $generateHtmlFromNodes(editor)));
105105
});

0 commit comments

Comments
 (0)