diff --git a/include/class.format.php b/include/class.format.php
index 9267c9ff950fd8eda683031619db828c42dbe9ac..99a708c6eeb7d770e8933ce71ef840404df73308 100644
--- a/include/class.format.php
+++ b/include/class.format.php
@@ -619,7 +619,10 @@ class Format {
                     $lang ?: ($cfg ? $cfg->getSystemLanguage() : 'en_US'))
             ) {
                 $tokenizer->setText($text);
-                $text = implode(' ', $tokenizer);
+                $tokens = array();
+                foreach ($tokenizer as $token)
+                    $tokens[] = $token;
+                $text = implode(' ', $tokens);
             }
         }
         else {