Are you experiencing an issue with...
:beetle: Description
Generated links may contain unencoded spaces which breaks links in certain markups (like RST).
:link: Link to the badge
The problem was that shields.io generated RST with a link that had spaces. So it was https://img.shields.io/github/workflow/status/ansible/pylibssh/π π¦ & test & publish/devel?label=GitHub%20Actions%20%5Btests%5D&logo=github instead of https://img.shields.io/github/workflow/status/ansible/pylibssh/π%20π¦%20&%20test%20&%20publish/devel?label=GitHub%20Actions%20%5Btests%5D&logo=github
:bulb: Possible Solution
I've fixed this for my repo with https://github.com/ansible/pylibssh/commit/66a1a2bb5a5b4e674cd3c2a2e9e0aafefe48292f but I think shields.io should generate proper links, at least having spaces %-encoded.
(label should be bug: #5043)
Hi! It sounds like this is a problem in the frontend, yea? Could you clarify the steps to reproduce? i.e. what need to be filled into which fields?
Are you clicking Copy Badge URL at the end or are you using the RsT option? If the RsT, does the problem still manifest if you use Copy Badge URL?
https://shields.io/category/build -> GitHub Workflow Status (branch) -> enter ansible/pylibssh/π π¦ & test & publish/devel -> Copy Badge URL (or Copy reStructuredText) -> https://img.shields.io/github/workflow/status/ansible/pylibssh/π π¦ & test & publish/devel which is wrong because most of the parsers will recognize only the part before the first space as a URL.
The copied RST is broken therefore too:
.. image:: https://img.shields.io/github/workflow/status/ansible/pylibssh/π π¦ & test & publish/devel
:alt: GitHub Workflow Status (branch)
_(and also it's copied as a one-line thing but should be two lines which is its own separate bug)_
The copied URL should be https://img.shields.io/github/workflow/status/ansible/pylibssh/π%20π¦%20&%20test%20&%20publish/devel instead.
Thanks for the steps! It's super helpful to have a detailed report.
It seems to me this may be a bug or feature request in path-to-regexp⦠though it might also be something we have to deal with ourselves.
The fix might be as simple as URL-encoding the path segments, though that will URL-encode everything, including some characters which I think in practice work just fine in URLs.
Most helpful comment
https://shields.io/category/build ->
GitHub Workflow Status (branch)-> enteransible/pylibssh/π π¦ & test & publish/devel->Copy Badge URL(orCopy reStructuredText) ->https://img.shields.io/github/workflow/status/ansible/pylibssh/π π¦ & test & publish/develwhich is wrong because most of the parsers will recognize only the part before the first space as a URL.The copied RST is broken therefore too:
_(and also it's copied as a one-line thing but should be two lines which is its own separate bug)_
The copied URL should be
https://img.shields.io/github/workflow/status/ansible/pylibssh/π%20π¦%20&%20test%20&%20publish/develinstead.