> Subject: Yahoo Mail Failure.
authorphilippe_mingo <philippe_mingo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 15 Feb 2002 06:02:05 +0000 (06:02 +0000)
committerphilippe_mingo <philippe_mingo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 15 Feb 2002 06:02:05 +0000 (06:02 +0000)
> From: "Chris Picciotto" <Chris@Picciotto.net>
> Date: Thu, February 14, 2002 5:20 pm

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2451 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/mime.php
src/webmail.php

index 61ee7357139860568ce2628c0a83ac0f4e20c7e9..bae0fd9ae7029ac0cfb7a4776fcd5f1adb99f9fa 100644 (file)
@@ -632,7 +632,7 @@ function formatBody($imap_stream, $message, $color, $wrap_at) {
         } else {
             translateText($body, $wrap_at, $body_message->header->charset);
         }
         } else {
             translateText($body, $wrap_at, $body_message->header->charset);
         }
-        
+
         $body .= "<SMALL><CENTER><A HREF=\"../src/download.php?absolute_dl=true&passed_id=$id&passed_ent_id=$ent_num&mailbox=$urlmailbox&showHeaders=1\">". _("Download this as a file") ."</A></CENTER><BR></SMALL>";
 
         /** Display the ATTACHMENTS: message if there's more than one part **/
         $body .= "<SMALL><CENTER><A HREF=\"../src/download.php?absolute_dl=true&passed_id=$id&passed_ent_id=$ent_num&mailbox=$urlmailbox&showHeaders=1\">". _("Download this as a file") ."</A></CENTER><BR></SMALL>";
 
         /** Display the ATTACHMENTS: message if there's more than one part **/
@@ -827,7 +827,7 @@ return ($string);
  */
 function encodeHeader ($string) {
     global $default_charset;
  */
 function encodeHeader ($string) {
     global $default_charset;
-    
+
     // Encode only if the string contains 8-bit characters or =?
     $j = strlen( $string  );
     $l = strstr($string, '=?');         // Must be encoded ?
     // Encode only if the string contains 8-bit characters or =?
     $j = strlen( $string  );
     $l = strstr($string, '=?');         // Must be encoded ?
@@ -855,7 +855,7 @@ function encodeHeader ($string) {
              $ret .= $string{$i};
         }
     }
              $ret .= $string{$i};
         }
     }
-    
+
     if ( $l ) {
         $string = "=?$default_charset?Q?$ret?=";
     }
     if ( $l ) {
         $string = "=?$default_charset?Q?$ret?=";
     }
@@ -868,7 +868,7 @@ function encodeHeader ($string) {
 */
 function MagicHTML( $body, $id ) {
 
 */
 function MagicHTML( $body, $id ) {
 
-    global $message, $HTTP_SERVER_VARS, 
+    global $message, $HTTP_SERVER_VARS,
            $attachment_common_show_images;
 
     $attachment_common_show_images =
            $attachment_common_show_images;
 
     $attachment_common_show_images =
@@ -886,11 +886,12 @@ function MagicHTML( $body, $id ) {
             $pos = $i + 1;
             $tag = '';
             while ($body{$pos} == ' ' || $body{$pos} == "\t" ||
             $pos = $i + 1;
             $tag = '';
             while ($body{$pos} == ' ' || $body{$pos} == "\t" ||
-                   $body{$pos} == "\n") {
+                   $body{$pos} == "\n" ) {
                 $pos ++;
             }
             while (strlen($tag) < 4 && $body{$pos} != ' ' &&
                 $pos ++;
             }
             while (strlen($tag) < 4 && $body{$pos} != ' ' &&
-                   $body{$pos} != "\t" && $body{$pos} != "\n") {
+                   $body{$pos} != "\t" && $body{$pos} != "\n" &&
+                   $pos < $j ) {
                 $tag .= $body{$pos};
                 $pos ++;
             }
                 $tag .= $body{$pos};
                 $pos ++;
             }
index 596a4ccc1f2211483bbe7737013d6d1201ff1e9d..16e4b247d12043a040cd639e1a70e16325341ab7 100644 (file)
@@ -78,7 +78,7 @@ else {
  * we would like to use as little Javascript as possible.
  */
 if (!isset($right_frame)) {
  * we would like to use as little Javascript as possible.
  */
 if (!isset($right_frame)) {
-    $right_frame = "";
+    $right_frame = '';
 }
 
 if ($right_frame == 'right_main.php') {
 }
 
 if ($right_frame == 'right_main.php') {
@@ -96,14 +96,14 @@ if ($right_frame == 'right_main.php') {
 }
 
 if ($location_of_bar == 'right') {
 }
 
 if ($location_of_bar == 'right') {
-    echo "<FRAME SRC=\"$right_frame_url\" NORESIZE NAME=\"right\">";
-    echo '<FRAME SRC="left_main.php" NORESIZE NAME="left">';
+    echo "<FRAME SRC=\"$right_frame_url\" NORESIZE NAME=\"right\">" .
+         '<FRAME SRC="left_main.php" NORESIZE NAME="left">';
 }
 else {
 }
 else {
-    echo '<FRAME SRC="left_main.php" NORESIZE NAME="left">';
-    echo "<FRAME SRC=\"$right_frame_url\" NORESIZE NAME=\"right\">";
+    echo '<FRAME SRC="left_main.php" NORESIZE NAME="left">'.
+         "<FRAME SRC=\"$right_frame_url\" NORESIZE NAME=\"right\">";
 }
 
 ?>
 </FRAMESET>
 }
 
 ?>
 </FRAMESET>
-</HEAD></HTML>
+</HEAD></HTML>
\ No newline at end of file