*
* Functions needed to display the options pages.
*
- * @copyright 1999-2017 The SquirrelMail Project Team
+ * @copyright 1999-2024 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package squirrelmail
//Check for a current value.
if (isset($GLOBALS[$name])) {
$this->value = $GLOBALS[$name];
+ // TODO: This code should be something more like the following, but who knows what would break if it was changed at this point
+ // } else if (initial_value !== '') {
} else if (!empty($initial_value)) {
$this->value = $initial_value;
} else {
// all other widgets except TEXTAREAs should never be allowed to have newlines
//
- else if ($option->type != SMOPT_TYPE_TEXTAREA)
+ else if ($option->type != SMOPT_TYPE_TEXTAREA && !empty($option->new_value))
$option->new_value = str_replace(array("\r", "\n"), '', $option->new_value);