fixed a bug reported by clorenzo regarding nonprintable characters within the mailheader

This commit is contained in:
Klaus Leithoff 2008-05-15 13:52:10 +00:00
parent 789e13a4ce
commit 46a584400c

View File

@ -385,10 +385,12 @@
}
$string = str_replace('=?ISO8859-','=?ISO-8859-',$string);
}
return mb_decode_mimeheader($string);
$string = mb_decode_mimeheader($string);
return preg_replace('/([\000-\012\015\016\020-\037\075])/','',$string);
} elseif(function_exists(iconv_mime_decode)) {
// continue decoding also if an error occurs
return iconv_mime_decode($_string, 2, $this->displayCharset);
$string = @iconv_mime_decode($_string, 2, $this->displayCharset);
preg_replace('/([\000-\012\015\016\020-\037\075])/','',$string);
} elseif(function_exists(imap_mime_header_decode)) {
$newString = '';
@ -402,12 +404,12 @@
$tempString = $this->botranslation->convert($element->text,$element->charset);
$newString .= $tempString;
}
return $newString;
return preg_replace('/([\000-\012\015\016\020-\037\075])/','',$newString);
}
// no decoding function available
return $_string;
return preg_replace('/([\000-\012\015\016\020-\037\075])/','',$_string);
}
function deleteAccount($_hookValues)