From 56383d14fcb956735971afef35cd202741746c30 Mon Sep 17 00:00:00 2001 From: James Ward Date: Mon, 20 Jun 2022 21:58:20 +0100 Subject: [PATCH] * Hotfix for escaping html in email_to (resending broke) --- src/MailAdminTable.php | 2 +- src/Models/Logs.php | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/MailAdminTable.php b/src/MailAdminTable.php index a23a584..ffdf41f 100644 --- a/src/MailAdminTable.php +++ b/src/MailAdminTable.php @@ -86,7 +86,7 @@ function column_email_to($item) 'export' => '' . __('Export', 'WpMailCatcher') . '', ]; - return sprintf('%1$s %2$s', $item['email_to'], $this->row_actions($actions)); + return sprintf('%1$s %2$s', htmlspecialchars($item['email_to']), $this->row_actions($actions)); } function column_status($item) diff --git a/src/Models/Logs.php b/src/Models/Logs.php index cfa9fdb..26ba8ff 100644 --- a/src/Models/Logs.php +++ b/src/Models/Logs.php @@ -153,14 +153,6 @@ static private function dbResultTransform($results, $args = []) foreach ($results as &$result) { $result['attachment_file_paths'] = []; - if (isset($result['email_to'])) { - $result['email_to'] = htmlspecialchars($result['email_to']); - } - - if (isset($result['subject'])) { - $result['subject'] = htmlspecialchars($result['subject']); - } - if (isset($result['status'])) { $result['status'] = (bool)$result['status']; }