source/Core/GenericImport/GenericImport.php
protected function csvTextConvert($text, $mode)
    {
        $search = [chr(13), chr(10), '\'', '"'];
        $replace = ['&#13;', '&#10;', '&#39;', '&#34;'];

        if ($mode) {
            $text = str_replace($search, $replace, $text);
        } else {
            $text = str_replace($replace, $search, $text);
        }

        return $text;
    }
protected function csvTextConvert($text, $mode)
    {
        $search = [chr(13), chr(10), '\'', '"'];
        $replace = ['&#13;', '&#10;', '&#39;', '&#34;'];

        if ($mode) {
            $text = str_replace($search, $replace, $text);
        } else {
            $text = str_replace($replace, $search, $text);
        }

        return $text;
    }
protected function csvTextConvert ( $ text , $ mode ) { $ search = [ chr ( 13 ) , chr ( 10 ) , '\'' , '"' ] ; $ replace = [ '&#13;' , '&#10;' , '&#39;' , '&#34;' ] ; if ( $ mode ) { $ text = str_replace ( $ search , $ replace , $ text ) ; } else { $ text = str_replace ( $ replace , $ search , $ text ) ; } return $ text ; }
Parses and replaces special chars.

@param string $text input text
@param bool   $mode true = Text2CSV, false = CSV2Text

@return string
Parses and replaces special chars .