diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 5142bf00d4c..1e3e878dad5 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -6246,7 +6246,7 @@ class Form
if (empty($conf->global->MAIN_POPUP_CALENDAR_ON_FOCUS)) {
$retstring .= "
showOn: 'button', /* both has problem with autocompletion */
- buttonImage: '".DOL_URL_ROOT."/theme/".$conf->theme."/img/object_calendarday.png',
+ buttonImage: '".DOL_URL_ROOT."/theme/".dol_escape_js($conf->theme)."/img/object_calendarday.png',
buttonImageOnly: true";
}
$retstring .= "
@@ -6259,7 +6259,7 @@ class Form
$retstring .= 'trans("FormatDateShortJavaInput").'\'); "'; // FormatDateShortInput for dol_print_date / FormatDateShortJavaInput that is same for javascript
+ $retstring .= ' onChange="dpChangeDay(\''.dol_escape_js($prefix).'\',\''.dol_escape_js($langs->trans("FormatDateShortJavaInput")).'\'); "'; // FormatDateShortInput for dol_print_date / FormatDateShortJavaInput that is same for javascript
$retstring .= '>';
// Icone calendrier
diff --git a/htdocs/core/lib/security2.lib.php b/htdocs/core/lib/security2.lib.php
index 2edb2e629de..a37a77712c3 100644
--- a/htdocs/core/lib/security2.lib.php
+++ b/htdocs/core/lib/security2.lib.php
@@ -157,7 +157,7 @@ if (!function_exists('dol_loginfunction')) {
// Note: $conf->css looks like '/theme/eldy/style.css.php'
/*
- $conf->css = "/theme/".(GETPOST('theme','alpha')?GETPOST('theme','alpha'):$conf->theme)."/style.css.php";
+ $conf->css = "/theme/".(GETPOST('theme','aZ09')?GETPOST('theme','aZ09'):$conf->theme)."/style.css.php";
$themepath=dol_buildpath($conf->css,1);
if (! empty($conf->modules_parts['theme'])) // Using this feature slow down application
{
diff --git a/htdocs/externalsite/frames.php b/htdocs/externalsite/frames.php
index 04b48ba3cad..7462dd82c35 100644
--- a/htdocs/externalsite/frames.php
+++ b/htdocs/externalsite/frames.php
@@ -35,7 +35,7 @@ $langs->load("externalsite");
$mainmenu = GETPOST('mainmenu', "aZ09");
$leftmenu = GETPOST('leftmenu', "aZ09");
$idmenu = GETPOST('idmenu', 'int');
-$theme = GETPOST('theme', 'alpha');
+$theme = GETPOST('theme', 'aZ09');
$codelang = GETPOST('lang', 'aZ09');
$keyforcontent = GETPOST('keyforcontent', 'aZ09');
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 4ec8767a801..d3d18a3e1c1 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -1098,8 +1098,8 @@ if (!defined('NOLOGIN')) {
// Case forcing style from url
-if (GETPOST('theme', 'alpha')) {
- $conf->theme = GETPOST('theme', 'alpha', 1);
+if (GETPOST('theme', 'aZ09')) {
+ $conf->theme = GETPOST('theme', 'aZ09', 1);
$conf->css = "/theme/".$conf->theme."/style.css.php";
}
@@ -1704,8 +1704,8 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
}
print ''."\n";
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php
index de089ecba54..130a5d630ae 100644
--- a/htdocs/theme/eldy/style.css.php
+++ b/htdocs/theme/eldy/style.css.php
@@ -84,8 +84,8 @@ if (empty($dolibarr_nocache)) {
header('Cache-Control: no-cache');
}
-if (GETPOST('theme', 'alpha')) {
- $conf->theme = GETPOST('theme', 'alpha'); // If theme was forced on URL
+if (GETPOST('theme', 'aZ09')) {
+ $conf->theme = GETPOST('theme', 'aZ09'); // If theme was forced on URL
}
if (GETPOST('lang', 'aZ09')) {
$langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index 6c596ad2916..6b1cd6cfd0a 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -85,8 +85,8 @@ if (empty($dolibarr_nocache)) {
header('Cache-Control: no-cache');
}
-if (GETPOST('theme', 'alpha')) {
- $conf->theme = GETPOST('theme', 'alpha'); // If theme was forced on URL
+if (GETPOST('theme', 'aZ09')) {
+ $conf->theme = GETPOST('theme', 'aZ09'); // If theme was forced on URL
}
if (GETPOST('lang', 'aZ09')) {
$langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL