Link parsing not accepting closing ')' #109

julianduque opened this Issue Jan 16, 2013 · 4 comments

4 participants


When try to render a link with an ending ')' it is failing.

var marked = require('./lib/marked');
var link = '[snapshot](\))';

The result has the closing ')' is outside the link.

<p><a href="">snapshot</a>)</p>

This has been a problem for a while. I forgot about it for some reason. Back on the todo list.

edit: testing GFM...



edit 2: GFM links handle the parenthesis, regular links do not without the backslash.


I was trying to fix it but i'm not that good in regex so i failed 👎


See my comments to the related #102.

This was referenced Jun 6, 2013

angular/angular.js#6377 We're encountering this with angular and dgeni, it would be nice to fix this. Seems like this hasn't been poked at for a while. I'll see if I can hack together a fix tonight, that would be nice.

The problem with this is, no matter what you do, you can still end up causing certain links to be invalid, there's no real good way to do this. But hmm.

@bmathews bmathews referenced this issue in WikiEducationFoundation/WikiEduDashboard Sep 9, 2015

Markdown url formatting gets escaped by closing parens in url #316

@puzrin puzrin referenced this issue in pugjs/pug Oct 24, 2015
@fhemberger fhemberger Update vulnerable dependencies
`marked` and `uglify-js` have several reported security issues in versions used by jade:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment