Commit d867216c authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Fixes #5381 Fixed s modifier for accented characters

parent f1506215
...@@ -388,11 +388,11 @@ class templateHandling ...@@ -388,11 +388,11 @@ class templateHandling
if (preg_match('/^(\d+)-(\d+)$/', $args[1], $m)) { if (preg_match('/^(\d+)-(\d+)$/', $args[1], $m)) {
$res = array(); $res = array();
for ($i = $m[1];$i < $m[2]; ++$i) { for ($i = $m[1];$i < $m[2]; ++$i) {
$res[] = substr($str, $args[0], $i); $res[] = mb_substr($str, $args[0], $i);
} }
$result = array_unique($res); $result = array_unique($res);
} else { } else {
$result = array(substr($str, $args[0], $args[1])); $result = array(mb_substr($str, $args[0], $args[1]));
} }
break; break;
case 'r': case 'r':
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment