pypa / readme_renderer

Safely render long_description/README files in Warehouse
Apache License 2.0
158 stars 89 forks source link

Escaped HTML visible in package description on pypi.org #258

Closed sergei-maertens closed 2 years ago

sergei-maertens commented 2 years ago

(copied from https://github.com/pypi/warehouse/issues/12162, where I got forwarded to this repo)

Describe the bug

After publishing the package, there is some escaped HTML visible:

<nav class="contents" id="contents">
(table of contens, rendered properly)
</nav>

Seeing this with these projects:

I suspect that something is going wrong with the `contents::`` rst directive, but I can't guarantee this.

Expected behavior

No HTML should be visible, instead pypi.org should properly convert the rst into HTML.

To Reproduce

My Platform

Additional context

I cannot reproduce this using any of the rst2htmlX.py scripts in my virtualenv.

miketheman commented 2 years ago

Thanks for the report! This may have been induced by the recent change from html4 to html5 and the new semantic HTML tag wasn't allowed through our Bleach filter. We don't currently have a test for this directive, so apologies it was overlooked.

sergei-maertens commented 2 years ago

Thank you for the swift resolution!