mdx-editor / editor

A rich text editor React component for markdown
https://mdxeditor.dev
MIT License
1.91k stars 145 forks source link

[BUG] editor adds \ before link query parameters #547

Open shaipetel opened 2 months ago

shaipetel commented 2 months ago

Describe the bug

Links with query string: https://www.youtube.com/watch?v=YGjjxOVw0dQ&t=4s Are replaced with this: https://www.youtube.com/watch?v=YGjjxOVw0dQ\&t=4s

Reproduction Use the public live demo editor

To Reproduce Insert a link to a page with query string. example:

Link to [youtube](https://www.youtube.com/watch?v=YGjjxOVw0dQ&t=4s)

or just use the editor to insert a link to this url: https://www.youtube.com/watch?v=YGjjxOVw0dQ&t=4s

Switch between viewer to source, when you view source - you will see the \ was added to the link, breaking the query string.

Expected behavior Links query string should not break.

Desktop (please complete the following information):