forgejo/routers/web/repo
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
..
actions remove util.OptionalBool and related functions (#29513) 2024-03-06 12:10:46 +08:00
badges Fix repo badges when the label or text contains dashes 2024-03-20 22:41:20 +01:00
flags
setting Fix incorrect menu/link on webhook edit page (#29709) 2024-03-20 08:46:29 +01:00
activity.go
attachment.go
blame.go
branch.go Use repo object format name instead of detecting from git repository (#29702) 2024-03-20 08:46:28 +01:00
cherry_pick.go
code_frequency.go
commit.go
compare.go
contributors.go
download.go
editor.go
editor_test.go
find.go
githttp.go
githttp_test.go
helper.go
helper_test.go
issue.go Refactor to use optional.Option for issue index search option (#29739) 2024-03-20 08:46:28 +01:00
issue_content_history.go
issue_dependency.go
issue_label.go
issue_label_test.go
issue_lock.go
issue_pin.go
issue_stopwatch.go
issue_test.go
issue_timetrack.go
issue_watch.go
main_test.go
middlewares.go
migrate.go
milestone.go remove util.OptionalBool and related functions (#29513) 2024-03-06 12:10:46 +08:00
packages.go remove util.OptionalBool and related functions (#29513) 2024-03-06 12:10:46 +08:00
patch.go
projects.go remove util.OptionalBool and related functions (#29513) 2024-03-06 12:10:46 +08:00
projects_test.go
pull.go fix #2501 2024-03-14 12:34:41 +00:00
pull_review.go
pull_review_test.go
recent_commits.go
release.go
release_test.go
render.go
repo.go Some performance optimization on dashboard and issues page (#29010) 2024-03-20 08:46:28 +01:00
search.go Refactor code_indexer to use an SearchOptions struct for PerformSearch (#29724) 2024-03-18 12:25:05 +00:00
topic.go
treelist.go
view.go Move get/set default branch from git package to gitrepo package to hide repopath (#29126) 2024-03-11 23:36:59 +07:00
view_test.go
wiki.go
wiki_test.go Make "/user/login" page redirect if the current user has signed in (#29583) 2024-03-11 23:36:58 +07:00