mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 11:55:03 +03:00
Merge pull request #503 from sebgie/questionmarkbug
Fix for post with '?'
This commit is contained in:
commit
6f05812377
@ -109,6 +109,10 @@ Post = GhostBookshelf.Model.extend({
|
||||
slug = /^(ghost|ghost\-admin|admin|wp\-admin|dashboard|login|archive|archives|category|categories|tag|tags|page|pages|post|posts)$/g
|
||||
.test(slug) ? slug + '-post' : slug;
|
||||
|
||||
//if slug is empty after trimming use "post"
|
||||
if (!slug) {
|
||||
slug = "post";
|
||||
}
|
||||
// Test for duplicate slugs.
|
||||
return checkIfSlugExists(slug);
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user