sloria/sphinx-issues

Broken escaping of role title

kdeldycke opened this issue ยท 0 comments

Simple working case

Here is a couple of sphinx-issues roles in rST:

:issue:`17`

:commit:`170ce9`

This works great and is rendered as such in HTML:

<p>
  <a href="https://github.com/kdeldycke/meta-package-manager/issues/17">#17</a>
</p>
<p>
  <a href="https://github.com/kdeldycke/meta-package-manager/commit/170ce9">170ce9</a>
</p>

Perfect! ๐Ÿ˜Ž๐Ÿ‘

Broken escaping

But when I try to use the :role:`title <target>` schema like so:

:issue:`Issue #17 (the big one) <17>`

:commit:`1.0.0 (2016-07-05) <170ce9>`

Then the results gets mangled:

<p>
  <a href="https://github.com/kdeldycke/meta-package-manager/issues/Issue #17 (the big one) &lt;17&gt;">#Issue #17 (the big one) &lt;17&gt;</a>
</p>
<p>
  <a href="https://github.com/kdeldycke/meta-package-manager/commit/1.0.0 (2016-07-05) &lt;170ce9&gt;">1.0.0 (</a>
</p>

Expected result

Here is what I expect the resulting HTML to look like:

<p>
  <a href="https://github.com/kdeldycke/meta-package-manager/issues/17">Issue #17 (the big one)</a>
</p>
<p>
  <a href="https://github.com/kdeldycke/meta-package-manager/commit/170ce9">1.0.0 (2016-07-05)</a>
</p>