marked
marked copied to clipboard
A backtick in code in a link parses incorrectly
There was a security issue with backticks in links as shown in #1493 and fixed in #1515 Released in v0.7.0
Can I help to fix this?
Of course! PRs are always welcome.
I should have said: Can you please help me fix this?
I’m new to the codebase and have no idea where to start.
You will most likely have to change the regex for links in rules.js and update the link tokenizer in Tokenizer.js.
If you have any questions about anything feel free to ask.
I thought I’d have time to work on this, but I won’t. If someone else can take this, it’d be great 😃
Hey guys, I got here by looking for projects to contribute to during the Hacktoberfest. I opened a pull request to address this issue: https://github.com/markedjs/marked/pull/1794.
@UziTech, I updated the links in rules.js but apparently didn't need to update Tokenizer.js.
The PR passed all tests and I was looking where I could include a test case for this scenario of backticks in links.
However, as I inspected tests/specs/commonmark and tests/specs/gfm, the test cases seem to be based on examples from the CommonMark and GitHub specs, and do not support custom test cases.
Is there a test file where this scenario could be added?
test/specs/new is where you will need to add tests.