protected function _fixBlanks($str)
    {
        $lines = explode(PHP_EOL, $str);
        $clean = array();
        foreach ($lines as $line) {
            if (trim($line) != "") {
                $clean[] = $line;
            }
        }

        return implode(PHP_EOL, $clean);
    }