Fix escaping of parentheses in links and images #79

Merged
susnux merged 1 commit from fix/escape-url into master 2022-07-11 20:54:54 +02:00
susnux commented 2022-07-10 01:45:06 +02:00 (Migrated from github.com)
  • Resolves: #78

If the URL contains a ) character the link is currently not correctly serialized.

* Resolves: #78 If the URL contains a `)` character the link is currently not correctly serialized.
marijnh commented 2022-07-10 11:42:18 +02:00 (Migrated from github.com)

Could you resubmit this without the spurious whitespace changes in the test file? (Turn off whole-file auto-reindentation in your editor.)

Could you resubmit this without the spurious whitespace changes in the test file? (Turn off whole-file auto-reindentation in your editor.)
susnux commented 2022-07-10 15:04:17 +02:00 (Migrated from github.com)

@marijnh Fixed that.

I think it happened because everywhere else the lines are indented by 2 spaces, except those three lines where 3 spaces are used.

@marijnh Fixed that. I think it happened because everywhere else the lines are indented by 2 spaces, except those three lines where 3 spaces are used.
marijnh commented 2022-07-11 10:46:31 +02:00 (Migrated from github.com)

Markdown handles balanced parentheses in URLs automatically. I.e. [foo](bar(baz)) is a valid link. Escaping one of the parens will break that ([foo](bar(baz\)) is not a valid link). So this should probably escape opening parens as well.

Markdown handles balanced parentheses in URLs automatically. I.e. `[foo](bar(baz))` is a valid link. Escaping one of the parens will break that (`[foo](bar(baz\))` is not a valid link). So this should probably escape opening parens as well.
susnux commented 2022-07-11 11:18:07 +02:00 (Migrated from github.com)

So this should probably escape opening parens as well.

You are right! Fixed that, too.

> So this should probably escape opening parens as well. You are right! Fixed that, too.
marijnh commented 2022-07-11 20:55:25 +02:00 (Migrated from github.com)

Thanks!

Thanks!
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
prosemirror/prosemirror-markdown!79
No description provided.