diff --git a/classes/tables/comments_table.php b/classes/tables/comments_table.php index a7e5027..7aaf509 100644 --- a/classes/tables/comments_table.php +++ b/classes/tables/comments_table.php @@ -134,6 +134,17 @@ public function other_cols($colname, $value) { } } + /** + * Format each row of returned data. + * + * @param array|object $row row of data from db used to make one row of the table. + * @return array one row for the table with sanitised content. + */ + public function format_row($row): array { + $row->content = clean_param($row->content, PARAM_TEXT); + return parent::format_row($row); + } + /** * Displays the table. */