~edwargix/git.sr.ht

ee3bcdc1ed11ae653b4992d35b01d1cce08c990f — Drew DeVault 7 years ago faad891
Handle non-UTF-8 READMEs
1 files changed, 1 insertions(+), 1 deletions(-)

M gitsrht/blueprints/repo.py
M gitsrht/blueprints/repo.py => gitsrht/blueprints/repo.py +1 -1
@@ 49,7 49,7 @@ def get_readme(repo, tip):
    try:
        md = repo.get(readme.id).data.decode()
    except:
        pass
        md = "Error decoding readme - is it valid UTF-8?"
    html = markdown(md, ["h1", "h2", "h3", "h4", "h5"])
    redis.setex(key, html, timedelta(days=7))
    return Markup(html)