mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
🐛 Fixed tag with # not generating "hash-" prefix at tag screen
closes https://github.com/TryGhost/Ghost/issues/11105 - Updates slug generation on tag screen to add "hash-" prefix for tags with name starting from #
This commit is contained in:
parent
b62b8e4142
commit
1cc3b2ed7e
@ -89,6 +89,9 @@ export default Controller.extend({
|
||||
// Generate slug based on name for new tag when empty
|
||||
if (propKey === 'name' && !tag.get('slug') && isNewTag) {
|
||||
let slugValue = slugify(newValue);
|
||||
if (/^#/.test(newValue)) {
|
||||
slugValue = 'hash-' + slugValue;
|
||||
}
|
||||
tag.set('slug', slugValue);
|
||||
}
|
||||
// TODO: This is required until .validate/.save mark fields as validated
|
||||
|
Loading…
Reference in New Issue
Block a user