diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php
index 310857e24cc..364fcfe49f1 100644
--- a/htdocs/projet/tasks.php
+++ b/htdocs/projet/tasks.php
@@ -763,7 +763,20 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
// Description
print '
| '.$langs->trans("Description").' | ';
print '';
- print '';
+
+ if (empty($conf->global->FCKEDITOR_ENABLE_SOCIETE)) {
+ print '';
+ } else {
+ // WYSIWYG editor
+ include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
+ $cked_enabled = (!empty($conf->global->FCKEDITOR_ENABLE_DETAILS) ? $conf->global->FCKEDITOR_ENABLE_DETAILS : 0);
+ if (!empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) {
+ $nbrows = $conf->global->MAIN_INPUT_DESC_HEIGHT;
+ }
+ $doleditor = new DolEditor('description', $object->description, '', 80, 'dolibarr_details', '', false, true, $cked_enabled, $nbrows);
+ print $doleditor->Create();
+ }
+
print ' |
';
print '| '.$langs->trans("Budget").' | ';
diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php
index 19be96cc558..f6e9b6803af 100644
--- a/htdocs/projet/tasks/task.php
+++ b/htdocs/projet/tasks/task.php
@@ -99,7 +99,8 @@ if ($action == 'update' && !GETPOST("cancel") && $user->rights->projet->creer) {
$object->ref = $taskref ? $taskref : GETPOST("ref", 'alpha', 2);
$object->label = GETPOST("label", "alphanohtml");
- $object->description = GETPOST('description', "alphanohtml");
+ if (empty($conf->global->FCKEDITOR_ENABLE_SOCIETE)) $object->description = GETPOST('description', "alphanohtml");
+ else $object->description = GETPOST('description', "restricthtml");
$object->fk_task_parent = $task_parent;
$object->planned_workload = $planned_workload;
$object->date_start = dol_mktime(GETPOST('dateohour', 'int'), GETPOST('dateomin', 'int'), 0, GETPOST('dateomonth', 'int'), GETPOST('dateoday', 'int'), GETPOST('dateoyear', 'int'));
@@ -439,7 +440,19 @@ if ($id > 0 || !empty($ref)) {
// Description
print '
| '.$langs->trans("Description").' | ';
print '';
- print '';
+
+ if (empty($conf->global->FCKEDITOR_ENABLE_SOCIETE)) {
+ print '';
+ } else {
+ // WYSIWYG editor
+ include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
+ $cked_enabled = (!empty($conf->global->FCKEDITOR_ENABLE_DETAILS) ? $conf->global->FCKEDITOR_ENABLE_DETAILS : 0);
+ if (!empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) {
+ $nbrows = $conf->global->MAIN_INPUT_DESC_HEIGHT;
+ }
+ $doleditor = new DolEditor('description', $object->description, '', 80, 'dolibarr_details', '', false, true, $cked_enabled, $nbrows);
+ print $doleditor->Create();
+ }
print ' |
';
print '| '.$langs->trans("Budget").' | ';
@@ -536,7 +549,7 @@ if ($id > 0 || !empty($ref)) {
// Description
print ''.$langs->trans("Description").' | ';
- print nl2br($object->description);
+ print dol_htmlentitiesbr($object->description);
print ' |
';
print '';