adding decoding of subject. might have to check other columns too.
authortokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 15 Apr 2005 14:13:53 +0000 (14:13 +0000)
committertokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 15 Apr 2005 14:13:53 +0000 (14:13 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@9302 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/mailbox_display.php

index d892cdc..eca9bc2 100644 (file)
@@ -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('&amp;',$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);