Removed the count_chars funtion (not in use, and exists in PHP4.0b4)
[squirrelmail.git] / functions / strings.php
index ba2e137612aebc679df0f299decde3be93fd8927..44f1d12265a22808a31384c9bc5d3c844a2eabd4 100644 (file)
@@ -91,7 +91,7 @@
       return $to_line;
    }
 
-   function translateText($body, $wrap_at) {
+   function translateText($body, $wrap_at, $charset) {
       /** 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);
    }
 
    /* SquirrelMail version number -- DO NOT CHANGE */
-   $version = "0.3";
+   $version = "0.4pre1";
 
 
    function find_mailbox_name ($mailbox) {