mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-30 09:14:08 +02:00
parent
403c2d3495
commit
769d490631
@ -157,11 +157,10 @@ class Directive
|
|||||||
{
|
{
|
||||||
$str = trim($str);
|
$str = trim($str);
|
||||||
$str = str_replace('\\', '\\\\', $str);
|
$str = str_replace('\\', '\\\\', $str);
|
||||||
$str = str_replace('"', '\\"', $str);
|
$str = str_replace('"', '\"', $str);
|
||||||
|
$str = str_replace("\r", '\r', $str);
|
||||||
|
$str = str_replace("\n", '\n', $str);
|
||||||
|
|
||||||
// line breaks in the value should always match the current system EOL sequence
|
|
||||||
// to assure editable configuration files
|
|
||||||
$str = preg_replace("/(\r\n)|(\n)/", PHP_EOL, $str);
|
|
||||||
return $str;
|
return $str;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -284,8 +284,8 @@ class IniParser
|
|||||||
*/
|
*/
|
||||||
protected static function unescapeSectionName($str)
|
protected static function unescapeSectionName($str)
|
||||||
{
|
{
|
||||||
$str = str_replace('\\"', '"', $str);
|
$str = str_replace('\"', '"', $str);
|
||||||
$str = str_replace('\\;', ';', $str);
|
$str = str_replace('\;', ';', $str);
|
||||||
|
|
||||||
return str_replace('\\\\', '\\', $str);
|
return str_replace('\\\\', '\\', $str);
|
||||||
}
|
}
|
||||||
@ -299,8 +299,11 @@ class IniParser
|
|||||||
*/
|
*/
|
||||||
protected static function unescapeOptionValue($str)
|
protected static function unescapeOptionValue($str)
|
||||||
{
|
{
|
||||||
$str = str_replace('\\"', '"', $str);
|
$str = str_replace('\n', "\n", $str);
|
||||||
|
$str = str_replace('\r', "\r", $str);
|
||||||
|
$str = str_replace('\"', '"', $str);
|
||||||
|
$str = str_replace('\\\\', '\\', $str);
|
||||||
|
|
||||||
return str_replace('\\\\', '\\', $str);
|
return $str;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user