~edwargix/git.sr.ht

5df8556284cc5238516e5134ec107d97c3a1fb70 — Armin Weigl 3 years ago 0df2a1a
Fix /~o/r/log 500ing if default branch is invalid utf-8
1 files changed, 2 insertions(+), 2 deletions(-)

M gitsrht/templates/log.html
M gitsrht/templates/log.html => gitsrht/templates/log.html +2 -2
@@ 1,12 1,12 @@
{% extends "repo.html" %}
{% import "utils.html" as utils with context %}
{% block title %}
<title>{{repo.owner.canonical_name}}/{{repo.name}}: {% if path != [''] %}{{path_join(*path)}} {% endif %}{{ ref.decode() }} - {{cfg("sr.ht", "site-name")}} git</title>
<title>{{repo.owner.canonical_name}}/{{repo.name}}: {% if path != [''] %}{{path_join(*path)}} {% endif %}{{ ref.decode("utf-8", "replace") }} - {{cfg("sr.ht", "site-name")}} git</title>
{% endblock %}

{% block head %}
  <link rel="alternate"
    title="{{ repo.owner.canonical_name }}/{{ repo.name }}: {{ ref.decode() }} log"
    title="{{ repo.owner.canonical_name }}/{{ repo.name }}: {{ ref.decode('utf-8', 'replace') }} log"
    type="application/rss+xml"
    href="{{ root }}{{ repo|log_rss_url(ref=ref) }}">
{% endblock %}