From a0670549de120d36dbd82b70fd1ec6aeea9f7a96 Mon Sep 17 00:00:00 2001 From: Edmund Farrow Date: Wed, 20 Nov 2024 14:33:17 +0000 Subject: [PATCH] iss1317 - Notes validation line break fix --- stack/input/notes/notes.class.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/stack/input/notes/notes.class.php b/stack/input/notes/notes.class.php index e3e23ad2d97..63b39dc006b 100644 --- a/stack/input/notes/notes.class.php +++ b/stack/input/notes/notes.class.php @@ -230,4 +230,13 @@ public function get_api_solution($tavalue) { public function get_api_solution_render($tadisplay) { return ''; } + + protected function ajax_to_response_array($in) { + // ISS1317 EJMF - Notes are treated the same as textareas on the front end so + // we need to add this to match the textarea input and avoid + //
appearing in the validation display. + $in = explode('
', $in); + $in = implode("\n", $in); + return [$this->name => $in]; + } }