Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Badges Don't Display Correctly if Title Contains Dash #307

Closed
AntumDeluge opened this issue Jun 17, 2021 · 0 comments · Fixed by #308
Closed

Badges Don't Display Correctly if Title Contains Dash #307

AntumDeluge opened this issue Jun 17, 2021 · 0 comments · Fixed by #308

Comments

@AntumDeluge
Copy link
Contributor

AntumDeluge commented Jun 17, 2021

Summary

If a mod's title includes a dash (-) (U+002D), the shields.io badge is not displayed correctly.

Details

Example: xdecor (X-Decor)

  • ContentDB ( https://content.minetest.net/packages/jp/xdecor/shields/title/ / https://img.shields.io/badge/ContentDB-X-Decor-%23375a7f )

Downloads badge works fine:

  • ContentDB ( ![ContentDB](https://content.minetest.net/packages/jp/xdecor/shields/downloads/) )

The problem is that shields.io uses dashes as the delimiter for parsing arguments in static URLs.

Possible Solutions

Replace dashes with hyphen (‐) (U+2010) Use query string parameters
ContentDB ContentDB
https://img.shields.io/badge/ContentDB-X‐Decor-%23375a7f https://img.shields.io/static/v1?label=ContentDB&message=X%2DDecor&color=%23375a7f
AntumDeluge added a commit to AntumMT/contentdb that referenced this issue Jun 17, 2021
AntumDeluge added a commit to AntumMT/contentdb that referenced this issue Jun 17, 2021
Fixes badges not displaying when dash (-) in title.

Reference: minetest#307
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant