Preserve AsciiDoc footnote link ids
Problem to solve
Footnote link ids are currently removed by the sanitization. Here's an example:
This paragraph has a footnote.footnote:[This is the text of the footnote.]
And here's the generated HTML before sanitization:
<div>
<div>
<p>This paragraph has a footnote.<sup class="footnote">[<a id="_footnoteref_1" href="#_footnotedef_1" title="View footnote.">1</a>]</sup></p>
</div>
</div>
<div id="footnotes">
<hr>
<div id="_footnotedef_1">
<a href="#_footnoteref_1">1</a>. This is the text of the footnote.
</div>
</div>
And here's the generated HTML after sanitization:
<div>
<p>This paragraph has a footnote.<sup>[<a href="#_footnotedef_1" title="View footnote.">1</a>]</sup></p>
</div>
<div>
<hr>
<div>
<a href="#_footnoteref_1">1</a>. This is the text of the footnote.
</div>
</div>
As you can see the link #_footnotedef_1
and #_footnoteref_1
won't be resolved anymore.
Intended users
Everyone that writes or reads AsciiDoc document on GitLab.
Proposal
Relax the sanitization to preserve the footnote link ids.
Links / references
Related: https://gitlab.com/gitlab-org/gitlab-ce/issues/63298