Updated that add_event API can support newline literally.

This commit is contained in:
hkosaka 2014-10-07 15:23:49 +09:00
parent ba5ed6cbfe
commit 723e68a9ed
2 changed files with 2 additions and 2 deletions

View File

@ -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];

View File

@ -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", '&#x0a;'), "<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);