From 16caa9ba69662a0fc47da666f1759b88b5326007 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 12 Sep 2014 20:19:27 +0200 Subject: [PATCH] Handle qute://help more intuitively (load index.html) --- qutebrowser/network/qutescheme.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qutebrowser/network/qutescheme.py b/qutebrowser/network/qutescheme.py index d77c7a788..49977f363 100644 --- a/qutebrowser/network/qutescheme.py +++ b/qutebrowser/network/qutescheme.py @@ -128,6 +128,9 @@ class QuteHandlers: @classmethod def help(cls, request): """Handler for qute:help. Return HTML content as bytes.""" - path = 'html/doc/{}'.format(request.url().path()) + urlpath = request.url().path() + if not urlpath or urlpath == '/': + urlpath = 'index.html' + path = 'html/doc/{}'.format(urlpath) return utils.read_file(path).encode('UTF-8', errors='xmlcharrefreplace')