wikis: force wiki names to follow same rules as tag names.
Don't allow wiki pages to have invalid names. This incidentally means that you can't create wiki pages for pools. For example, you can't create a wiki titled "pool:almost_heart-warming". This is not a valid tag name, so it's not a valid wiki name either. This was done in a handful of cases to translate Pixiv tags to Danbooru pools (see: <https://danbooru.donmai.us/wiki_page_versions?search[title_like]=pool:*>) Also fix it so that titles are normalized before validation, not before save.
This commit is contained in:
@@ -109,13 +109,6 @@ class WikiPagesControllerTest < ActionDispatch::IntegrationTest
|
||||
assert_response 404
|
||||
end
|
||||
|
||||
should "render for a negated tag" do
|
||||
as(@user) { @wiki_page.update(title: "-aaa") }
|
||||
|
||||
get wiki_page_path(@wiki_page.id)
|
||||
assert_redirected_to wiki_page_path(@wiki_page.title)
|
||||
end
|
||||
|
||||
should "work for a title containing dots" do
|
||||
as(@user) { create(:wiki_page, title: "...") }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user