From a5a1a031d81bfe1a45112ba8161dddf56dad538b Mon Sep 17 00:00:00 2001 From: Matthew Scragg Date: Sun, 24 Apr 2016 18:33:25 -0500 Subject: [PATCH] fix: bug when editing pages with dots in name --- realms/modules/wiki/views.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/realms/modules/wiki/views.py b/realms/modules/wiki/views.py index 422af13..0f4ee9c 100644 --- a/realms/modules/wiki/views.py +++ b/realms/modules/wiki/views.py @@ -76,16 +76,15 @@ def history(name): @login_required def edit(name): cname = to_canonical(name) - page = g.current_wiki.get_page(name) + page = g.current_wiki.get_page(cname) if not page: # Page doesn't exist return redirect(url_for('wiki.create', name=cname)) - name = remove_ext(page['path']) g.assets['js'].append('editor.js') return render_template('wiki/edit.html', - name=name, + name=cname, content=page.get('data'), info=page.get('info'), sha=page.get('sha'),