From: tokul Date: Fri, 15 Apr 2005 14:13:53 +0000 (+0000) Subject: adding decoding of subject. might have to check other columns too. X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=129c22edabae0dc959b1adfbb4c53b98d9d9d9df;hp=605ce3855a47f1062e4ddc8fe96d70b366e49269 adding decoding of subject. might have to check other columns too. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@9302 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index d892cdca..eca9bc2b 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -517,13 +517,17 @@ function prepareMessageList(&$aMailbox, $aProps) { $value = ($sTmp) ? htmlspecialchars($sTmp) : $sUnknown; break; case SQM_COL_SUBJ: + // subject is mime encoded, decode it. + // value is sanitized in decoding function. + $value=decodeHeader($value); if ($highlight_list && !$bHighLight) { $bHighLight = highlightMessage('SUBJECT', $value, $highlight_list, $aFormattedMessages[$iUid]); } $iIndent = (isset($aIndentArray[$aId[$i]])) ? $aIndentArray[$aId[$i]] : 0; + // FIXME: don't break 8bit symbols and html entities during truncation if (isset($aColumnDesc[$k]['truncate']) && $aColumnDesc[$k]['truncate']) { $sTmp = truncateWithEntities($value, $aColumnDesc[$k]['truncate']-$iIndent); - $title = ($sTmp != $value) ? htmlspecialchars($value) : ''; + $title = ($sTmp != $value) ? $value : ''; $value = $sTmp; } /* generate the link to the message */ @@ -531,11 +535,9 @@ function prepareMessageList(&$aMailbox, $aProps) { // TODO, $sTargetModule should be a query parameter so that we can use a single entrypoint $link = $sTargetModule.'.php?' . implode('&',$aQuery); } - $value = (trim($value)) ? $value : _("(no subject)"); /* add thread indentation */ $aColumns[$k]['indent'] = $iIndent; - $value = htmlspecialchars($value); break; case SQM_COL_SIZE: $value = show_readable_size($value);