mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-26 15:44:01 +00: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
1 changed files with 1 additions and 1 deletions
|
|
@ -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 a new issue