Ghost/core/server/models/base
Simon Backx da9de95b74
🐛 Fixed duplicate tags created when slugs contain spaces (#14277)
refs https://github.com/TryGhost/Team/issues/1284

When you create a new post with a tag slug that contains spaces, those spaces will get replaced by dashes. But instead of reusing an existing tag, a new tag is always created.

- New tag slugs are cleaned up before matching with existing tags in the Post model onSaving method
- Cleaned up multiple loops in onSaving of Post model
- Cleaned up syntax when cleaning up tag slug
- Added tests for slugs with spaces
- Added test for too long tag slug causing duplication
2022-03-10 13:07:00 +01:00
..
plugins 🐛 Fixed duplicate tags created when slugs contain spaces (#14277) 2022-03-10 13:07:00 +01:00
bookshelf.js Removed explicit loading of Bookshelf registry plugin 2021-09-10 16:59:11 +01:00
index.js Disabled new Bookshelf fetch behaviour across models 2021-09-10 16:59:11 +01:00
listeners.js Switch to @tryghost/errors from ignition errors package (#13807) 2021-12-01 10:22:01 +00:00
utils.js Updated bson-objectid calls to match API change 2021-04-21 16:23:52 +01:00