diff --git a/cms/comment_checks.php b/cms/comment_checks.php index ef27d0a..969898e 100644 --- a/cms/comment_checks.php +++ b/cms/comment_checks.php @@ -134,13 +134,13 @@ $justification_ascii = "EXTENDED"; } - $comment_author_name_json = json_encode( $comment_author_name ); + $comment_author_name_json = json_encode( htmlentities( $comment_author_name ) ); - $comment_title_json = json_encode( $comment_title ); + $comment_title_json = json_encode( htmlentities( $comment_title ) ); - $comment_text_json = json_encode( $comment_text ); + $comment_text_json = json_encode( htmlentities( $comment_text ) ); - $justification_json = json_encode( $justification ); + $justification_json = json_encode( htmlentities( $justification ) ); $comment_timestamp_json = json_encode( $comment_timestamp ); diff --git a/cms/schedule.php b/cms/schedule.php index 238376f..bb3ad99 100644 --- a/cms/schedule.php +++ b/cms/schedule.php @@ -73,7 +73,9 @@ if ($result = mysqli_query($connection, $ep_retrieve)) { else { $status = "Reserved"; } - $show_array[$id] = array ( "date" => date('Y-m-d', strtotime($date) ), + $show_array[$id] = array ( + "id" => $id, + "date" => date('Y-m-d', strtotime($date) ), "title" => $title, "host" => $host, "status" => $status, @@ -102,7 +104,8 @@ if ($result = mysqli_query($connection, $ep_retrieve)) { $id = $row['ep_num']; $date = $row['ep_date']; $status = $row['status']; - $show_array[$id] = array ( "date" => date('Y-m-d', strtotime($date) ), + $show_array[$id] = array ( "id" => $id, + "date" => date('Y-m-d', strtotime($date) ), "title" => $status, "host" => "Unverified", "status" => "Processing", @@ -121,7 +124,8 @@ if ($result = mysqli_query($connection, $ep_retrieve)) { $date = $row['ep_date']; $seconds_to_expiration = $row['seconds_to_expiration']; $minutes = floor($seconds_to_expiration / 60) + 1; - $show_array[$id] = array ( "date" => date('Y-m-d', strtotime($date) ), + $show_array[$id] = array ( "id" => $id, + "date" => date('Y-m-d', strtotime($date) ), "title" => " Available again in $minutes minutes", "host" => "Unverified", "status" => "Locked", @@ -153,7 +157,8 @@ if ($result = mysqli_query($connection, $ep_retrieve)) { $date = $row['date']; $title = $row['title']; $host = $row['host']; - $show_array[$id] = array ( "date" => date('Y-m-d', strtotime($date) ), + $show_array[$id] = array ( "id" => $id, + "date" => date('Y-m-d', strtotime($date) ), "title" => $title, "host" => $host, "status" => "Finished",