Skip to content
This repository has been archived by the owner on Aug 3, 2020. It is now read-only.

Fix yaml export #15

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,6 @@ protected function _getRS($length, $string = ' ')
*/
protected function _prepareValue($value)
{
if (is_numeric($value)) {
return $value;
}

if (strpos($value, "\n") !== FALSE) {
$values = explode("\n", $value);
foreach ($values as &$line) {
Expand All @@ -86,6 +82,6 @@ protected function _prepareValue($value)
return "|\n" . $value;
}

return '"' . addcslashes($value, '"') . '"';
return sprintf("'%s'", str_replace('\'', '\'\'', $value));
}
}
}