diff --git a/components/ILIAS/DataCollection/classes/Content/class.ilDclRecordListGUI.php b/components/ILIAS/DataCollection/classes/Content/class.ilDclRecordListGUI.php index 405e97da72df..a7ac6053bbf8 100755 --- a/components/ILIAS/DataCollection/classes/Content/class.ilDclRecordListGUI.php +++ b/components/ILIAS/DataCollection/classes/Content/class.ilDclRecordListGUI.php @@ -195,7 +195,7 @@ public function listRecords(bool $use_tableview_filter = false): void if ($ilSetting->get('advanced_editing_javascript_editor')) { $desc = "
" . $desc . "
"; } else { - $desc = "
" . nl2br(ilUtil::stripSlashes($desc)) . "
"; + $desc = "
" . nl2br($this->refinery->encode()->htmlSpecialCharsAsEntities()->transform($desc)) . "
"; } } $this->tpl->setContent($desc . $list->getHTML()); diff --git a/components/ILIAS/DataCollection/classes/Fields/Text/class.ilDclTextRecordFieldModel.php b/components/ILIAS/DataCollection/classes/Fields/Text/class.ilDclTextRecordFieldModel.php index 174af88730d2..6c59bce66582 100755 --- a/components/ILIAS/DataCollection/classes/Fields/Text/class.ilDclTextRecordFieldModel.php +++ b/components/ILIAS/DataCollection/classes/Fields/Text/class.ilDclTextRecordFieldModel.php @@ -133,7 +133,7 @@ public function parseValue($value) if ($this->getField()->getProperty(ilDclBaseFieldModel::PROP_TEXTAREA) && !$this->getField()->getProperty(ilDclBaseFieldModel::PROP_URL) ) { - return nl2br($value); + return $value; } return $value; diff --git a/components/ILIAS/DataCollection/classes/Fields/Text/class.ilDclTextRecordRepresentation.php b/components/ILIAS/DataCollection/classes/Fields/Text/class.ilDclTextRecordRepresentation.php index 5264706e0c10..f39df741ea77 100755 --- a/components/ILIAS/DataCollection/classes/Fields/Text/class.ilDclTextRecordRepresentation.php +++ b/components/ILIAS/DataCollection/classes/Fields/Text/class.ilDclTextRecordRepresentation.php @@ -69,7 +69,7 @@ public function getHTML(bool $link = true, array $options = []): string 'renderRecord' ) . '">' . $value . ''; } else { - $html = (is_array($value) && isset($value['link'])) ? $value['link'] : $value; + $html = (is_array($value) && isset($value['link'])) ? $value['link'] : nl2br($value); } if (!$html) { diff --git a/components/ILIAS/DataCollection/classes/Setup/class.ilDataCollectionDBUpdateSteps9.php b/components/ILIAS/DataCollection/classes/Setup/class.ilDataCollectionDBUpdateSteps9.php index 50e4aa6d627a..b9d248956b8f 100755 --- a/components/ILIAS/DataCollection/classes/Setup/class.ilDataCollectionDBUpdateSteps9.php +++ b/components/ILIAS/DataCollection/classes/Setup/class.ilDataCollectionDBUpdateSteps9.php @@ -165,4 +165,16 @@ public function step_10(): void $this->db->addIndex('il_dcl_tfield_set', array('table_id'), 'i4'); } } + + public function step_11(): void + { + $this->db->manipulateF( + 'UPDATE il_dcl_stloc1_value v '. + 'INNER JOIN il_dcl_record_field rf ON rf.id = v.record_field_id ' . + 'INNER JOIN il_dcl_field f ON f.id = rf.field_id ' . + 'SET v.value = REPLACE(v.value, "
", "\r\n") WHERE f.datatype_id = %s', + [ilDBConstants::T_INTEGER], + [ilDclDatatype::INPUTFORMAT_TEXT] + ); + } }