-
-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Markdown crashes with specific HTML-like string input #652
Comments
@ruben-hexens You can make some settings to filter out certain tags. react-md-editor/www/src/Example.tsx Lines 37 to 54 in 2520e88
|
@jaywcjlove Thank you for your response. It seems like the problem is related to how these tags are handled in the editor, rather than just filtering them out. Could you provide guidance on how to prevent the crash while allowing such valid input to be processed safely? |
Description
When providing the string
<!DOCTYPE html><!-- <html>\n <head>\n
as the source of the Markdown, the@uiw/react-md-editor
crashes and throws an error: "Cannot read properties of null (reading 'data')".Steps to Reproduce
@uiw/react-md-editor
in a React component.<!DOCTYPE html><!-- <html>\n <head>\n
.Expected Behavior
The editor should handle the input gracefully without crashing.
Actual Behavior
The editor crashes and throws an error: "Cannot read properties of null (reading 'data')".
Additional Information
Relevant Code
The text was updated successfully, but these errors were encountered: