mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Adding public to reserved slugs
See this [tweet](https://twitter.com/TryGhost/status/459069697930330112) Also see the new [Wiki page](https://github.com/TryGhost/Ghost/wiki/Reserved-Slugs)
This commit is contained in:
parent
185d13a108
commit
31d0014130
1 changed files with 1 additions and 1 deletions
|
@ -262,7 +262,7 @@ ghostBookshelf.Model = ghostBookshelf.Model.extend({
|
|||
slug = slug.charAt(slug.length - 1) === '-' ? slug.substr(0, slug.length - 1) : slug;
|
||||
|
||||
// Check the filtered slug doesn't match any of the reserved keywords
|
||||
slug = /^(ghost|ghost\-admin|admin|wp\-admin|wp\-login|dashboard|logout|login|signin|signup|signout|register|archive|archives|category|categories|tag|tags|page|pages|post|posts|user|users|rss|feed)$/g
|
||||
slug = /^(ghost|ghost\-admin|admin|wp\-admin|wp\-login|dashboard|logout|login|signin|signup|signout|register|archive|archives|category|categories|tag|tags|page|pages|post|posts|public|user|users|rss|feed)$/g
|
||||
.test(slug) ? slug + '-' + baseName : slug;
|
||||
|
||||
//if slug is empty after trimming use "post"
|
||||
|
|
Loading…
Add table
Reference in a new issue