fix path bugs

This commit is contained in:
Matthew Scragg 2015-12-10 21:51:36 -06:00
parent efbaf9e217
commit e565a0a77a
2 changed files with 2 additions and 2 deletions

View File

@ -69,7 +69,7 @@ def extract_name(file_path):
def remove_ext(path):
return os.path.splitext(path)[0]
return re.sub(r"\..*$", "", path)
def clean_url(url):

View File

@ -77,7 +77,7 @@ def edit(name):
# Page doesn't exist
return redirect(url_for('wiki.create', name=cname))
name = remove_ext(page['name'])
name = remove_ext(page['path'])
g.assets['js'].append('editor.js')
return render_template('wiki/edit.html',
name=name,