diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 2afad30c454..e313c1207cb 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -277,11 +277,11 @@ if (empty($conf->global->AGENDA_DISABLE_EXT)) { // Note: $conf->global->buggedfile can be empty or 'uselocalandtznodaylight' or 'uselocalandtzdaylight' $listofextcals[] = array( 'src' => getDolGlobalString($source), - 'name' => getDolGlobalString($name), - 'offsettz' => (!empty($conf->global->$offsettz) ? $conf->global->$offsettz : 0), - 'color' => getDolGlobalString($color), - 'default' => getDolGlobalString($default), - 'buggedfile' => (isset($conf->global->buggedfile) ? $conf->global->buggedfile : 0) + 'name' => dol_string_nohtmltag(getDolGlobalString($name)), + 'offsettz' => (int) getDolGlobalInt($offsettz, 0), + 'color' => dol_string_nohtmltag(getDolGlobalString($color)), + 'default' => dol_string_nohtmltag(getDolGlobalString($default)), + 'buggedfile' => dol_string_nohtmltag(getDolGlobalString('buggedfile', '')) ); } } @@ -302,11 +302,11 @@ if (empty($user->conf->AGENDA_DISABLE_EXT)) { // Note: $conf->global->buggedfile can be empty or 'uselocalandtznodaylight' or 'uselocalandtzdaylight' $listofextcals[] = array( 'src' => $user->conf->$source, - 'name' => $user->conf->$name, - 'offsettz' => (!empty($user->conf->$offsettz) ? $user->conf->$offsettz : 0), - 'color' => $user->conf->$color, - 'default' => $user->conf->$default, - 'buggedfile' => (isset($user->conf->buggedfile) ? $user->conf->buggedfile : 0) + 'name' => dol_string_nohtmltag($user->conf->$name), + 'offsettz' => (int) (empty($user->conf->$offsettz) ? 0 : $user->conf->$offsettz), + 'color' => dol_string_nohtmltag($user->conf->$color), + 'default' => dol_string_nohtmltag($user->conf->$default), + 'buggedfile' => dol_string_nohtmltag(isset($user->conf->buggedfile) ? $user->conf->buggedfile : '') ); } } @@ -613,7 +613,7 @@ if (!empty($conf->use_javascript_ajax)) { // If javascript on $default = ''; } - $s .= '