Subversion Repositories Applications.projet

Compare Revisions

Ignore whitespace Rev 252 → Rev 253

/trunk/classes/ezmlm-php-2.0/ezmlm-msgdisplay.php
1,5 → 1,5
<?php
// $Id: ezmlm-msgdisplay.php,v 1.5 2007-06-25 12:15:07 alexandre_tb Exp $
// $Id: ezmlm-msgdisplay.php,v 1.6 2007-09-10 11:22:24 alexandre_tb Exp $
//
// ezmlm-msgdisplay.php - ezmlm-php v2.0
// --------------------------------------------------------------
360,5 → 360,22
</ezmlm-headers>
</dl>' ;
}
// _cte_8bit: decode a content transfer encoding of 8bit
// NOTE: this function is a little bit special. Since the end result will be displayed in
// a web browser _cte_8bit decodes ASCII characters > 127 (the US-ASCII table) into the
// html ordinal equivilant, it also ensures that the messages content-type is changed
// to include text/html if it changes anything...
function _cte_8bit($data,$simple = FALSE) {
if ($simple) { return $data; }
$changed = FALSE;
$chars = preg_split('//',$data);
while (list($key,$val) = each($chars)) {
if (ord($val) > 127) { $out .= '&#' . ord($val) . ';'; $changed = TRUE; }
else { $out .= $val; }
}
if ($changed) { $this->headers['content-type'][1] = 'text/html'; }
return $out;
}
 
}