Handle qute://help more intuitively (load index.html)
This commit is contained in:
parent
f2b10160cc
commit
16caa9ba69
@ -128,6 +128,9 @@ class QuteHandlers:
|
|||||||
@classmethod
|
@classmethod
|
||||||
def help(cls, request):
|
def help(cls, request):
|
||||||
"""Handler for qute:help. Return HTML content as bytes."""
|
"""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',
|
return utils.read_file(path).encode('UTF-8',
|
||||||
errors='xmlcharrefreplace')
|
errors='xmlcharrefreplace')
|
||||||
|
Loading…
Reference in New Issue
Block a user