]>
BookStack Code Mirror - bookstack/commitdiff
projects
/
bookstack
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
0d5d77d
)
Russian slug and Multibyte String
582/head
author
Vladimir
<redacted>
Fri, 3 Nov 2017 12:00:07 +0000
(14:00 +0200)
committer
GitHub
<redacted>
Fri, 3 Nov 2017 12:00:07 +0000
(14:00 +0200)
app/Repos/EntityRepo.php
patch
|
blob
|
history
diff --git
a/app/Repos/EntityRepo.php
b/app/Repos/EntityRepo.php
index 95ae2ed0e78673c73fbe19856fb923dcadf582cd..25d229be13512ec055ce40fd586f5c35b19f1a0c 100644
(file)
--- a/
app/Repos/EntityRepo.php
+++ b/
app/Repos/EntityRepo.php
@@
-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;