Merge pull request #279 from Benaiah/full-stops-in-entry-titles

Disallow full stops in entry slugs
This commit is contained in:
Shawn Erquhart 2017-03-14 16:51:49 -04:00 committed by GitHub
commit 224ef6ec3e

View File

@ -34,7 +34,7 @@ const slugFormatter = (template = "{{slug}}", entryData) => {
case "day":
return (`0${ date.getDate() }`).slice(-2);
case "slug":
return identifier.trim().toLowerCase().replace(/[^a-z0-9\.\-_]+/gi, "-");
return identifier.trim().toLowerCase().replace(/[^a-z0-9\-_]+/gi, "-");
default:
return entryData.get(field, "").trim().toLowerCase().replace(/[^a-z0-9\.\-_]+/gi, "-");
}