forgejo/routers/web
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
..
admin Add a warning for disallowed email domains (#29658) 2024-03-20 08:46:28 +01:00
auth Make "/user/login" page redirect if the current user has signed in (#29583) 2024-03-11 23:36:58 +07:00
devtest
events
explore Refactor code_indexer to use an SearchOptions struct for PerformSearch (#29724) 2024-03-18 12:25:05 +00:00
feed Rename Str2html to SanitizeHTML and clarify its behavior (#29516) 2024-03-06 12:10:45 +08:00
healthcheck
misc
org Filter Repositories by type (#29231) 2024-03-06 12:10:46 +08:00
repo Fix repo badges when the label or text contains dashes 2024-03-20 22:41:20 +01:00
shared [BUG] Reflect Cargo index state in settings 2024-03-20 09:17:49 +01:00
user Refactor to use optional.Option for issue index search option (#29739) 2024-03-20 08:46:28 +01:00
base.go
githttp.go
goget.go
home.go
metrics.go
nodeinfo.go
swagger_json.go
web.go Use Get but not Post to get actions artifacts (#29734) 2024-03-20 08:46:28 +01:00
webfinger.go