Happy New Year
[squirrelmail.git] / templates / default / options.tpl
index 611dec731d4a34a890ccf9b0b03ad3c8d90f8eee..c0cd1b2b3f957f2f0f665b0b3060fde3c805d740 100644 (file)
@@ -11,7 +11,7 @@
  *                       ['name']     - The name of the option group
  *                       ['options']  - array of squirrelOption objects
  *
- * @copyright © 1999-2009 The SquirrelMail Project Team
+ * @copyright 1999-2018 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
@@ -61,15 +61,12 @@ foreach ($option_groups as $option) {
             echo   "<tr>\n" .
                    " <td class=\"optionName\"" . ($opt->caption_wrap ? '' : ' style="white-space:nowrap"') . ">\n  ";
 
-            if ($opt->type == SMOPT_TYPE_BOOLEAN_CHECKBOX
-             || $opt->type == SMOPT_TYPE_BOOLEAN) {
-                echo '<label for="new_' . $opt->name . '">'
-                   . $opt->caption . '</label>';
-            } else if ($opt->type == SMOPT_TYPE_TEXTAREA && !empty($opt->trailing_text)) {
-                echo $opt->caption . '<br /><small>' . $opt->trailing_text . '</small>';
-            } else {
-                echo $opt->caption;
+            echo '<label for="new_' . $opt->name . '">' . $opt->caption;
+            if ($opt->type == SMOPT_TYPE_TEXTAREA && !empty($opt->trailing_text)) {
+// TODO: Is trailing_text already sanitized here? (sm_encode_html_special_chars())  Either way, we want to have an option to sanitize or not depending on $opt->trailing_text_is_html ---- note that this question may already be taken care of in functions/options.php and irrelevant here, but I'm not sure about that yet.... after looking a little, it does appear this is a problem, though where to solve it is not clear
+                echo '<br /><small>' . $opt->trailing_text . '</small>';
             }
+            echo '</label>';
 
             echo   "\n </td>\n" .
                    " <td class=\"optionValue\">\n" .