added dropdown box for subscribe
[squirrelmail.git] / functions / strings.php
index ba2e137612aebc679df0f299decde3be93fd8927..c9c6b9b29b32124d9343b43a6e998331e0f44804 100644 (file)
@@ -91,7 +91,8 @@
       return $to_line;
    }
 
-   function translateText($body, $wrap_at) {
+   function translateText($body, $wrap_at, $charset) {
+      include ("../functions/url_parser.php");
       /** Add any parsing you want to in here */
       $body = trim($body);
       $body_ary = explode("\n", $body);
          $line = $body_ary[$i];
          $line = "^^$line";
 
-         $line = str_replace(">", ">", $line);
-         $line = str_replace("<", "&lt;", $line);
+         //$line = str_replace(">", "&gt;", $line);
+         //$line = str_replace("<", "&lt;", $line);
+         //$line = htmlspecialchars($line);
 
          if (strlen($line) >= $wrap_at) // -2 because of the ^^ at the beginning
             $line = wordWrap($line, $wrap_at);
 
+         $line = charset_decode($charset, $line);
+
          $line = str_replace(" ", "&nbsp;", $line);
          $line = str_replace("\t", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;", $line);
          $line = nl2br($line);
             $line = "<TT><FONT COLOR=000000>$line</FONT></TT><BR>\n";
          }
 
+         $line = parseEmail ($line);
+         $line = parseUrl ($line);
          $new_body[$i] = "$line";
       }
       $bdy = implode("\n", $new_body);
    }
 
    /* SquirrelMail version number -- DO NOT CHANGE */
-   $version = "0.3";
+   $version = "0.4pre1";
 
 
    function find_mailbox_name ($mailbox) {