markdig
markdig copied to clipboard
Why is the hyperlink & automatically encoded as &
var pipeline = new MarkdownPipelineBuilder().Build();
var md = @"[link](https://pan.test.com/s/?pwd=93d3&path=%2Fv%2Ffid)";
var doc = Markdown.Parse(md, pipeline);
var html = doc.ToHtml(pipeline); //<p><a href="https://pan.test.com/s/?pwd=93d3&path=%2Fv%2Ffid">link</a></p>
Output hyperlinks & automatically encode as &
I don't remember that it was clearly specified in the specs (left to the implementation), and babelmark indicates that most CommonMark implementation are escaping here
It has been the behavior for more than 6 years now, so I don't think it is a problem.
Indeed, this problem is not a big one. It would be better if you can keep the link as it is, or make a configuration. Thank you!