Wiki: links with spaces in the url render incorrectly with CommonMark
CommonMark does not support links with spaces in the same way that Redcarpet does:
markup | CommonMark | Redcarpet |
---|---|---|
[example](example.com) |
<a href="example.com">example</a> |
<a href="example.com">example</a> |
[example](with space) |
[example](with space) |
<a href="with%20space">example</a> |
Specifically, the text with spaces in the link portion is valid in Redcarpet, with the spaces encoded. CommonMark does not treat the link portion as a valid link.
As Gitlab previously treated links with spaces as valid, they could be used to reference a wiki page. So [page](this page)
would create something like <a href="http://localhost:3000/twitter/typeahead-js/wikis/this%20page">page</a>
and it gets routed to the correct wiki page with slug this-page
. This no longer works since CommonMark does not render it as a valid link.
While not a problem yet, as soon as we enable CommonMark for wiki pages, we'll need to solve.