diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php
index 67f521806cb..b4c1d4093d4 100644
--- a/htdocs/accountancy/bookkeeping/list.php
+++ b/htdocs/accountancy/bookkeeping/list.php
@@ -682,13 +682,13 @@ if ($action == 'export_file') {
'name' => 'notifiedexportdate',
'type' => 'checkbox',
'label' => $langs->trans('NotifiedExportDate'),
- 'value' => (!empty($conf->global->ACCOUNTING_DEFAULT_NOT_NOTIFIED_EXPORT_DATE) ? 'false' : 'true'),
+ 'value' => (empty($conf->global->ACCOUNTING_DEFAULT_NOTIFIED_EXPORT_DATE) ? false : true),
);
$form_question['notifiedvalidationdate'] = array(
'name' => 'notifiedvalidationdate',
'type' => 'checkbox',
'label' => $langs->trans('NotifiedValidationDate'),
- 'value' => (!empty($conf->global->ACCOUNTING_DEFAULT_NOT_NOTIFIED_VALIDATION_DATE) ? 'false' : 'true'),
+ 'value' => (empty($conf->global->ACCOUNTING_DEFAULT_NOTIFIED_VALIDATION_DATE) ? false : true),
);
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?'.$param, $langs->trans("ExportFilteredList").' ('.$listofformat[$formatexportset].')', $langs->trans('ConfirmExportFile'), 'export_fileconfirm', $form_question, '', 1, 300, 600);
diff --git a/htdocs/accountancy/closure/index.php b/htdocs/accountancy/closure/index.php
index 6b578bcab71..f02eda61bf6 100644
--- a/htdocs/accountancy/closure/index.php
+++ b/htdocs/accountancy/closure/index.php
@@ -13,7 +13,6 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see
';
print '
';
-print load_fiche_titre($langs->trans("OtherSetup").' ('.$langs->trans("Experimental").')', '', 'folder');
+print load_fiche_titre($langs->trans("OtherSetup"), '', 'folder');
//print ''.$langs->trans("PasswordEncryption").': ';
@@ -439,19 +439,24 @@ print '
';
print 'MAIN_ALWAYS_CREATE_LOCK_AFTER_LAST_UPGRADE = '.(empty($conf->global->MAIN_ALWAYS_CREATE_LOCK_AFTER_LAST_UPGRADE) ? ''.$langs->trans("Undefined").'' : $conf->global->MAIN_ALWAYS_CREATE_LOCK_AFTER_LAST_UPGRADE).' ('.$langs->trans("Recommended").': 1)
';
print '
';
+print 'MAIN_SECURITY_CSRF_WITH_TOKEN = '.(empty($conf->global->MAIN_SECURITY_CSRF_WITH_TOKEN) ? ''.$langs->trans("Undefined").'' : $conf->global->MAIN_SECURITY_CSRF_WITH_TOKEN).' ('.$langs->trans("Recommended").': 2)'."
";
+print '
';
+
+print '
';
+print '
';
+
+
+print load_fiche_titre($langs->trans("OtherSetup").' ('.$langs->trans("Experimental").')', '', 'folder');
+
print 'MAIN_RESTRICTHTML_ONLY_VALID_HTML = '.(empty($conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML) ? ''.$langs->trans("Undefined").' ('.$langs->trans("Recommended").': 1)' : $conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML)."
";
print '
';
print 'MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES = '.(empty($conf->global->MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES) ? ''.$langs->trans("Undefined").' ('.$langs->trans("Recommended").': 1)' : $conf->global->MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES)."
";
print '
';
-print 'MAIN_SECURITY_CSRF_WITH_TOKEN = '.(empty($conf->global->MAIN_SECURITY_CSRF_WITH_TOKEN) ? ''.$langs->trans("Undefined").'' : $conf->global->MAIN_SECURITY_CSRF_WITH_TOKEN).' ('.$langs->trans("Recommended").': 2)'."
";
-print '
';
-
print 'MAIN_SECURITY_CSRF_TOKEN_RENEWAL_ON_EACH_CALL = '.(empty($conf->global->MAIN_SECURITY_CSRF_TOKEN_RENEWAL_ON_EACH_CALL) ? ''.$langs->trans("Undefined").' ('.$langs->trans("Recommended").': '.$langs->trans("Undefined").' '.$langs->trans("or").' 0)' : $conf->global->MAIN_SECURITY_CSRF_TOKEN_RENEWAL_ON_EACH_CALL)."
";
print '
';
-
print 'MAIN_EXEC_USE_POPEN = ';
if (empty($conf->global->MAIN_EXEC_USE_POPEN)) {
print ''.$langs->trans("Undefined").'';
diff --git a/htdocs/core/class/doleditor.class.php b/htdocs/core/class/doleditor.class.php
index 93c0a2445dc..4a2e65ba1f3 100644
--- a/htdocs/core/class/doleditor.class.php
+++ b/htdocs/core/class/doleditor.class.php
@@ -326,19 +326,19 @@ class DolEditor
$out .= 'jQuery(document).ready(function() {
jQuery(".buttonforacesave").click(function() {
- console.log("We click on savefile button for component '.$this->htmlname.'");
- var aceEditor = window.ace.edit("'.$this->htmlname.'aceeditorid");
+ console.log("We click on savefile button for component '.dol_escape_js($this->htmlname).'");
+ var aceEditor = window.ace.edit("'.dol_escape_js($this->htmlname).'aceeditorid");
if (aceEditor) {
var cursorPos = aceEditor.getCursorPosition();
//console.log(cursorPos);
if (cursorPos) {
- jQuery("#'.$this->htmlname.'_x").val(cursorPos.column);
- jQuery("#'.$this->htmlname.'_y").val(cursorPos.row);
+ jQuery("#'.dol_escape_js($this->htmlname).'_x").val(cursorPos.column);
+ jQuery("#'.dol_escape_js($this->htmlname).'_y").val(cursorPos.row);
}
//console.log(aceEditor.getSession().getValue());
// Inject content of editor into the original HTML field.
- jQuery("#'.$this->htmlname.'").val(aceEditor.getSession().getValue());
- /*if (jQuery("#'.$this->htmlname.'").html().length > 0) return true;
+ jQuery("#'.dol_escape_js($this->htmlname).'").val(aceEditor.getSession().getValue());
+ /*if (jQuery("#'.dol_escape_js($this->htmlname).'").html().length > 0) return true;
else return false;*/
return true;
} else {
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 0381749ccd3..98998121ed9 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -4901,7 +4901,7 @@ class Form
$more .= '