diff --git a/lib/helper.php b/lib/helper.php index 908a61b5a2..2c221ddf19 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -661,7 +661,7 @@ class OC_Helper { $length = mb_strlen($search, $encoding); while(($i = mb_strrpos($subject, $search, $offset, $encoding)) !== false ) { $subject = OC_Helper::mb_substr_replace($subject, $replace, $i, $length); - $offset = $i - mb_strlen($subject, $encoding) - 1; + $offset = $i - mb_strlen($subject, $encoding); $count++; } return $subject;