mirror of
1
Fork 0
forgejo/routers
Gergely Nagy 8433f3aa09
Fix repo badges when the label or text contains dashes
shields.io uses dashes to separate parts of the badge it needs to
return. If our label or text parts contain dashes, we need to encode
those for shields.io to recognise what we want it to do, and to have the
correct text on the badge, too.

Fortunately, this is as simple as replacing all dashes with double
dashes in both the label and the text parts. We do not need to do the
same for the color, because that part is not user controlled.

This fixes the badges for cases when a workflow name includes dashes, or
when a release's tag name does.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-03-20 22:41:20 +01:00
..
api Fix PR creation via api between branches of same repo with head field namespaced (#26986) 2024-03-20 08:46:30 +01:00
common Use relative links for commits, mentions, and issues in markdown (#29427) 2024-03-20 08:46:28 +01:00
install Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
private Sync branches first (gitea#29714) 2024-03-18 17:39:34 +01:00
utils Improve user search display name (#29002) 2024-02-01 17:10:16 +00:00
web Fix repo badges when the label or text contains dashes 2024-03-20 22:41:20 +01:00
init.go Actions Artifacts v4 backend (#28965) 2024-03-06 12:10:45 +08:00