Adjustments to slug processing
This commit is contained in:
@ -36,7 +36,7 @@ const slugFormatter = (template = '{{slug}}', entryData) => {
|
|||||||
case 'slug':
|
case 'slug':
|
||||||
return identifier.trim().toLowerCase().replace(/[^a-z0-9\.\-_]+/gi, '-');
|
return identifier.trim().toLowerCase().replace(/[^a-z0-9\.\-_]+/gi, '-');
|
||||||
default:
|
default:
|
||||||
return entryData.get(field);
|
return entryData.get(field, '').trim().toLowerCase().replace(/[^a-z0-9\.\-_]+/gi, '-');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -175,8 +175,7 @@ class Backend {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const commitMessage = `${ (newEntry ? 'Created ' : 'Updated ') +
|
const commitMessage = `${ (newEntry ? 'Created ' : 'Updated ') +
|
||||||
collection.get('label') } “${
|
collection.get('label') } “${ entryObj.slug }”`;
|
||||||
entryDraft.getIn(['entry', 'data', 'title']) }”`;
|
|
||||||
|
|
||||||
const mode = config.get('publish_mode');
|
const mode = config.get('publish_mode');
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user