Add ability to show login error from the IMAP server instead of traditional "Unknown...
[squirrelmail.git] / plugins / fortune / functions.php
index dbf066d8dccab6b746e51aed0d93726cceb89b10..161c1875dc26c08a77673f9ee597b505139a4439 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * Fortune plugin functions
  *
- * @copyright © 2004-2006 The SquirrelMail Project Team
+ * @copyright 2004-2014 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package plugins
@@ -45,12 +45,12 @@ function fortune_function() {
     }
     /* if pclose return != 0, popen command failed. Yes, I know that it is broken when --enable-sigchild is used */
     if (pclose($handle)) {
-        // %s shows executed fortune cookie command.
+        // i18n: %s shows executed fortune cookie command.
         $fortune = sprintf(_("Unable to execute \"%s\"."),$fortune_command);
     }
 
     $oTemplate->assign('color', $color);
-    $oTemplate->assign('fortune', htmlspecialchars($fortune));
+    $oTemplate->assign('fortune', sm_encode_html_special_chars($fortune));
     $output = $oTemplate->fetch('plugins/fortune/mailbox_index_before.tpl');
     return array('mailbox_index_before' => $output);