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