fsf changes, meant to be rebased on upstream
[squirrelmail.git] / plugins / info / functions.php
index 5357bf6ca882e0f17f0b7338aa48373d991cc06e..b60f780c373400cceeec9d5c48021079f5659af9 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+
 /**
  * functions for info plugin
  *
@@ -8,9 +9,9 @@
  * The third prints the results of the IMAP command
  * to options.php.
  *
- * @copyright (c) 1999-2005 The SquirrelMail Project Team
+ * @author Jason Munro <jason at stdbev.com>
+ * @copyright 1999-2022 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
- * @author Jason Munro jason@stdbev.com
  * @version $Id$
  * @package plugins
  * @subpackage info
@@ -36,7 +37,7 @@ function get_caps($imap_stream) {
  * @access private
  */
 function imap_test($imap_stream, $string) {
-    print "<tr><td>".htmlspecialchars($string)."</td></tr>";
+    print "<tr><td>".sm_encode_html_special_chars($string)."</td></tr>";
     $response = sqimap_run_command_list($imap_stream, trim($string),false, $responses, $message,false);
     array_push($response, $responses . ' ' .$message);
     return $response;
@@ -49,14 +50,12 @@ function imap_test($imap_stream, $string) {
  * @access private
  */
 function print_response($response) {
-    foreach($response as $index=>$value) {
+    foreach($response as $value) {
         if (is_array($value)) {
             print_response($value);
         }
         else {
-            print htmlspecialchars($value)."<br />\n";
+            print sm_encode_html_special_chars($value)."<br />\n";
         }
     }
 }
-
-?>
\ No newline at end of file