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:
commit
3738a7d678
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user