[WikiPages] Normalize title in show_or_new (#806)

This commit is contained in:
Donovan Daniels 2024-12-08 21:03:38 -06:00 committed by GitHub
parent f0d18fe5d9
commit 18a382cf64
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -103,7 +103,7 @@ class WikiPagesController < ApplicationController
if @wiki_page
redirect_to wiki_page_path(@wiki_page)
else
@wiki_page = WikiPage.new(:title => params[:title])
@wiki_page = WikiPage.new(title: WikiPage.normalize_name(params[:title] || ""))
respond_with(@wiki_page)
end
end