Fix badges not displaying when dash (-) in title (#308)

This commit is contained in:
Jordan Irwin 2021-06-23 15:57:26 -07:00 committed by GitHub
parent 231c2a3a1e
commit 9e95b69c11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -182,7 +182,7 @@ def view(package):
@is_package_page
def shield(package, type):
if type == "title":
url = "https://img.shields.io/badge/ContentDB-{}-{}" \
url = "https://img.shields.io/static/v1?label=ContentDB&message={}&color={}" \
.format(urlescape(package.title), urlescape("#375a7f"))
elif type == "downloads":
#api_url = abs_url_for("api.package", author=package.author.username, name=package.name)