protected function cleanExport($string)
{
$quote = '"';
$slash = '\\';
$newline = "\n";
$replaces = array("{$slash}" => "{$slash}{$slash}", "{$quote}" => "{$slash}{$quote}", "\t" => '\\t');
$string = str_replace(array_keys($replaces), array_values($replaces), $string);
$po = $quote . implode("{$slash}n{$quote}{$newline}{$quote}", explode($newline, $string)) . $quote;
// remove empty strings
return str_replace("{$newline}{$quote}{$quote}", '', $po);
}