mdx-editor / mdx-editor/editor
[BUG] editor adds \ before link query parameters
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.7k
- Forks
- 307
- Avg merge
- 14h 22m
- Merged PRs (30d)
- 5
Description
- I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
- I have read the documentation and cannot find an answer.
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):
- OS: Windows
- Browser: Edge
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the public live demo editor and reproduce the viewer-to-source transition using the supplied YouTube URL with query parameters. Verify that switching views preserves the URL without adding a backslash, and confirm the fix against the provided Markdown reproduction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100