remove unnecessary html tag
[squirrelmail.git] / src / read_body.php
index a63ffb497709821cdee631040a48034655f1846a..c79cb323ccf92c582f87bacd941d4af43f294cb3 100644 (file)
@@ -267,7 +267,7 @@ function SendMDN ( $mailbox, $passed_id, $message, $imapConnection) {
         $success = $deliver->finalizeStream($stream);
     }
     if (!$success) {
-        $msg = _("Message not sent.") . "<br />\n" .
+        $msg = _("Message not sent.") . "\n" .
             $deliver->dlv_msg;
         if (! empty($deliver->dlv_server_msg)) {
             $msg.= '<br />' .
@@ -355,9 +355,10 @@ function formatRecipientString($recipients, $item ) {
         $a = array();
         foreach ($recipients as $r) {
             $a[] = array(
-                            'Name'  => htmlspecialchars($r->getAddress(false)),
+                            // note: decodeHeader is htmlsafe by default
+                            'Name'  => decodeHeader($r->getAddress(false)),
                             'Email' => htmlspecialchars($r->getEmail()),
-                            'Full'  => htmlspecialchars($r->getAddress(true))
+                            'Full'  => decodeHeader($r->getAddress(true))
                         );
         }
 
@@ -690,16 +691,26 @@ function formatToolbar($mailbox, $passed_id, $passed_ent_id, $message, $color) {
 
     // Build the printer friend link
     /* hackydiehack */
+
+    // Pull "view_unsafe_images" from the URL to find out if the unsafe images
+    // should be displayed. The default is not to display unsafe images.
     if( !sqgetGlobalVar('view_unsafe_images', $view_unsafe_images, SQ_GET) ) {
+        // If "view_unsafe_images" isn't part of the URL, default to not
+        // displaying unsafe images.
         $view_unsafe_images = false;
     } else {
+        //  If "view_unsafe_images" is part of the URL, display unsafe images
+        //  regardless of the value of the URL variable.
+        // FIXME: Do we really want to display the unsafe images regardless of the value in URL variable?
         $view_unsafe_images = true;
     }
+
     $pf_params = '?passed_ent_id=' . $urlPassed_ent_id .
                  '&mailbox=' . $urlMailbox .
                  '&passed_id=' . $urlPassed_id .
                  '&view_unsafe_images='. (bool) $view_unsafe_images .
                  '&show_html_default=' . $show_html_default;
+
     $links = array();
     $links[] = array (
                         'URL'   => $url,
@@ -808,6 +819,7 @@ if(sqgetGlobalVar('view_unsafe_images', $temp)) {
 } else {
     $view_unsafe_images = 0;
 }
+
 /**
  * Retrieve mailbox cache
  */