Skip to content

A free, self-hostable news aggregator…

Fix quote escaping on CLI (#2355)

Alexis Degrugillier8be28399efb5
diff --git a/cli/i18n/I18nFile.php b/cli/i18n/I18nFile.php
index bdcf3c079..56459ce8b 100644
--- a/cli/i18n/I18nFile.php
+++ b/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;