Updated that add_event API can support newline literally.
This commit is contained in:
parent
77c3df8eac
commit
502393f796
|
@ -6584,7 +6584,7 @@ function api_set_add_event_comment($id, $thrash2, $other, $thrash3) {
|
|||
return;
|
||||
}
|
||||
else if ($other['type'] == 'array') {
|
||||
$comment = $other['data'][0];
|
||||
$comment = io_safe_input($other['data'][0]);
|
||||
$meta = $other['data'][1];
|
||||
$history = $other['data'][2];
|
||||
|
||||
|
|
|
@ -2270,7 +2270,7 @@ function events_page_comments ($event) {
|
|||
$table_comments->class = "alternate rounded_cells";
|
||||
|
||||
$event_comments = io_safe_output($event["user_comment"]);
|
||||
$event_comments = str_replace("\n", "<br>", $event_comments);
|
||||
$event_comments = str_replace( array("\n", '
'), "<br>", $event_comments);
|
||||
|
||||
// If comments are not stored in json, the format is old
|
||||
$event_comments_array = json_decode($event_comments, true);
|
||||
|
|
Loading…
Reference in New Issue