mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-04-26 14:14:05 +08:00
Merge branch 'wowkaster-patch-1'
This commit is contained in:
commit
e27cbb9dce
@ -553,7 +553,7 @@ class EntityRepo
|
||||
*/
|
||||
protected function nameToSlug($name)
|
||||
{
|
||||
$slug = str_replace(' ', '-', strtolower($name));
|
||||
$slug = str_replace(' ', '-', function_exists('mb_strtolower') ? mb_strtolower($name) : strtolower($name));
|
||||
$slug = preg_replace('/[\+\/\\\?\@\}\{\.\,\=\[\]\#\&\!\*\'\;\:\$\%]/', '', $slug);
|
||||
if ($slug === "") $slug = substr(md5(rand(1, 500)), 0, 5);
|
||||
return $slug;
|
||||
|
Loading…
x
Reference in New Issue
Block a user