mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-11-24 02:02:40 +08:00
Russian slug and Multibyte String
This commit is contained in:
parent
0d5d77d8ab
commit
6b2581de63
|
@ -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…
Reference in New Issue
Block a user