# HG changeset patch # User Ludovic Chabant # Date 1442472232 25200 # Node ID 0979ace46676a0401fb7c607444904dca33085b4 # Parent 37f426e067c45c1408e31d2ed46c6e98f89e7f59 Fix "edit page" title. diff -r 37f426e067c4 -r 0979ace46676 wikked/webimpl/edit.py --- a/wikked/webimpl/edit.py Wed Sep 16 23:04:28 2015 -0700 +++ b/wikked/webimpl/edit.py Wed Sep 16 23:43:52 2015 -0700 @@ -43,10 +43,10 @@ def make_page_title(url): endpoint, path = split_page_url(url) last_slash = path.rstrip('/').rfind('/') - if last_slash < 0: - title = url[1:] + if last_slash < 0 or last_slash == 0: + title = path.lstrip('/') else: - title = url[last_slash + 1:] + title = path[last_slash + 1:] if endpoint: return '%s: %s' % (endpoint, title) return title