You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Hi, thanks for providing a great package.
It looks like escape sequences in links are not unescaped. Different Markdown renders treat this edge case slightly different. For example, GitHub does not unescape, but VS Code and CommonMark does unescape. As it's unusual to have a \ in a link, but common to have \., I think it will be safe to always unescaped.
This is likely a duplicate of #829. But this was closed and moved to the consolidation issue #984, and then never fixed. Hence, I'm posting this with a clear test case.
Thanks again.
To Reproduce
import{marked}from'marked';import{equal}from'node:assert/strict'constescaped="Link must have the format: https://youtu\\.be/\\_\\_"constexpected='<p>Link must have the format: <a href="https://youtu.be/__">https://youtu.be/__</a></p>\n'equal(marked.parse(escaped),expected);
Marked version:
v11.1.1
Describe the bug
Hi, thanks for providing a great package.
It looks like escape sequences in links are not unescaped. Different Markdown renders treat this edge case slightly different. For example, GitHub does not unescape, but VS Code and CommonMark does unescape. As it's unusual to have a
\
in a link, but common to have\.
, I think it will be safe to always unescaped.This is likely a duplicate of #829. But this was closed and moved to the consolidation issue #984, and then never fixed. Hence, I'm posting this with a clear test case.
Thanks again.
To Reproduce
Expected behavior
Actual output:
Link must have the format: https://youtu\.be/\_\_
Expected output:
Link must have the format: https://youtu.be/__
.The text was updated successfully, but these errors were encountered: