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

escape characters are not correctly unescaped in URLs #207

Closed
af4jm opened this issue May 19, 2021 · 2 comments
Closed

escape characters are not correctly unescaped in URLs #207

af4jm opened this issue May 19, 2021 · 2 comments

Comments

@af4jm
Copy link

af4jm commented May 19, 2021

If I have the following Markdown link...

[YouTube vid](https://www\.youtube\.com/watch?v=2SJ977\-CMPg&t=360)

it should generate the following HTML

<a href="https://www.youtube.com/watch?v=2SJ977-CMPg&amp;t=360">YouTube vid</a>

but instead it leaves the escaping backslashes in, and changes the & to &amp; resulting in a malformed URL

I see the issue in Textastic for iOS, but after filing a bug over there, they tell me they're also able to reproduce in Marked 2 (if MultiMarkdown is used but not if Discount is used)

@af4jm
Copy link
Author

af4jm commented May 19, 2021

here's some Markdown to check if escapes are handled correctly (if the 2 lines render the same strings of characters, it passes, if the first line has extra backslashes, it fails)

\!\#\(\)\*\+\-\.\[\\\]\^\_\`\{\|\}\~\
``!#()*+-.[\]^_`{|}~``

@fletcher
Copy link
Owner

See if the latests commits in develop fix your results.

Thanks!

@fletcher fletcher closed this as completed Jul 2, 2021
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

No branches or pull requests

2 participants