0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00

Merge pull request #1400 from gasman/fix/underscores-in-slugs

don't strip out underscores from page slugs
This commit is contained in:
Karl Hobley 2015-06-12 15:20:51 +01:00
commit 3738a7d678

View File

@ -282,7 +282,7 @@ function cleanForSlug(val, useURLify) {
if (URLify != undefined && useURLify !== false) { // Check to be sure that URLify function exists, and that we want to use it.
return URLify(val, val.length);
} else { // If not just do the "replace"
return val.replace(/\s/g, '-').replace(/[^A-Za-z0-9\-]/g, '').toLowerCase();
return val.replace(/\s/g, '-').replace(/[^A-Za-z0-9\-\_]/g, '').toLowerCase();
}
}