Skip to content

Broken escaping of role title #116

@kdeldycke

Description

@kdeldycke

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions