浏览代码

drop any double spaces since these will be displayed in the title-attribute

Thijs Kinkhorst 20 年之前
父节点
当前提交
d677e65490
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      functions/mailbox_display.php

+ 3 - 2
functions/mailbox_display.php

@@ -576,7 +576,8 @@ function prepareMessageList(&$aMailbox, $aProps) {
                     // 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) ? $value : '';
+                        // drop any double spaces since these will be displayed in the title
+                        $title = ($sTmp != $value) ? preg_replace('/\s{2,}/', ' ', $value) : '';
                         $value = $sTmp;
                     }
                     /* generate the link to the message */
@@ -1381,4 +1382,4 @@ function attachSelectedMessages($imapConnection,$aMsgHeaders) {
     return $composesession;
 }
 
-?>
+?>