minetest / contentdb

A content database for Minetest mods, games, and more
https://content.minetest.net
GNU Affero General Public License v3.0
93 stars 45 forks source link

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

Closed AntumDeluge closed 3 years ago

AntumDeluge commented 3 years ago

Summary

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

Details

Example: xdecor (X-Decor)

Downloads badge works fine:

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