Skip to content
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

Ensure the URL part of links is not escaped #71

Closed
wants to merge 2 commits into from

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Jun 22, 2022

This resolves #65

When doing the markdown serialization ensure that the URL part of links is not escaped as backslash escapes are not allowed within autolinks and the URL part of "normal" links (as of common mark).

This prevents invalid URLs after serialization if Autolinks containing _ or ~ are used (every other special markdown symbol should be URL encoded anyways for URLs).

Added also some tests to ensure this behavior.

As stated in the Commonmark specs backslash escapes do not work in Autolinks,
so this prevents escaping Autolinks and should resolve ProseMirror#65.
@marijnh
Copy link
Member

marijnh commented Jun 23, 2022

Thanks! Merged as 48170d4

@marijnh marijnh closed this Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Escaping special markdown characters causes problems with links
2 participants