From 7999e7e410e7cd41d346d55b26dfc6f2168bd0d6 Mon Sep 17 00:00:00 2001 From: Stefan Hanauska Date: Sun, 3 Mar 2024 21:24:36 +0100 Subject: [PATCH] Decode html entities for edit form --- classes/form/edit_card_form.php | 1 + classes/form/edit_column_form.php | 1 + 2 files changed, 2 insertions(+) diff --git a/classes/form/edit_card_form.php b/classes/form/edit_card_form.php index 6e791beb..df28ac5f 100644 --- a/classes/form/edit_card_form.php +++ b/classes/form/edit_card_form.php @@ -165,6 +165,7 @@ public function set_data_for_dynamic_submission(): void { $id = $this->optional_param('id', null, PARAM_INT); $card = $DB->get_record('kanban_card', ['id' => $id]); $options = json_decode($card->options); + $card->title = html_entity_decode($card->title, ENT_COMPAT, 'UTF-8'); $card->cmid = $this->optional_param('cmid', null, PARAM_INT); $card->boardid = $card->kanban_board; $card->assignees = $DB->get_fieldset_select('kanban_assignee', 'userid', 'kanban_card = :cardid', ['cardid' => $id]); diff --git a/classes/form/edit_column_form.php b/classes/form/edit_column_form.php index 9e6444d5..cfcab379 100644 --- a/classes/form/edit_column_form.php +++ b/classes/form/edit_column_form.php @@ -119,6 +119,7 @@ public function set_data_for_dynamic_submission(): void { $id = $this->optional_param('id', null, PARAM_INT); $column = $DB->get_record('kanban_column', ['id' => $id]); $column->cmid = $this->optional_param('cmid', null, PARAM_INT); + $column->title = html_entity_decode($column->title, ENT_COMPAT, 'UTF-8'); $column->boardid = $column->kanban_board; $options = json_decode($column->options); $column->autoclose = $options->autoclose;