mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Merge pull request #2644 from andschwa/master
Adding public to reserved slugs
This commit is contained in:
commit
999136a1f9
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;
|
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
|
// 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;
|
.test(slug) ? slug + '-' + baseName : slug;
|
||||||
|
|
||||||
//if slug is empty after trimming use "post"
|
//if slug is empty after trimming use "post"
|
||||||
|
|
Loading…
Add table
Reference in a new issue