Просмотр исходного кода

Fix quote escaping on CLI (#2355)

for translation manipulations
Alexis Degrugillier 7 лет назад
Родитель
Сommit
8be28399ef
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      cli/i18n/I18nFile.php

+ 1 - 1
cli/i18n/I18nFile.php

@@ -84,7 +84,7 @@ class I18nFile implements I18nFileInterface{
 		foreach ($translation as $compoundKey => $value) {
 			$keys = explode('.', $compoundKey);
 			array_shift($keys);
-			eval("\$a['" . implode("']['", $keys) . "'] = '" . $value . "';");
+			eval("\$a['" . implode("']['", $keys) . "'] = '" . addcslashes($value, "'") . "';");
 		}
 
 		return $a;