From 53b2035def91dc0fe6d8f68e4a34aca2acc79ec8 Mon Sep 17 00:00:00 2001 From: yehudah Date: Sat, 20 Jun 2020 21:39:39 +0000 Subject: Email log improvements: Solution column, filter. Some text clarify. --- Postman/PostmanLogFields.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Postman/PostmanLogFields.php') diff --git a/Postman/PostmanLogFields.php b/Postman/PostmanLogFields.php index 04d24a4..44bfee9 100644 --- a/Postman/PostmanLogFields.php +++ b/Postman/PostmanLogFields.php @@ -3,6 +3,7 @@ class PostmanLogFields { private $fields = array( 'success' => 'sanitize_text_field', + 'solution' => [ 'PostmanLogFields', 'sanitize_message' ], 'from_header' => [ 'PostmanLogFields', 'email_header_sanitize' ], 'to_header' => [ 'PostmanLogFields', 'email_header_sanitize' ], 'cc_header' => [ 'PostmanLogFields', 'email_header_sanitize' ], @@ -90,6 +91,17 @@ class PostmanLogFields { return wp_kses( $message, $allowed_tags ); } + private function sanitize_html( $value ) { + $allowed_html = array( + 'a' => array( + 'href' => array(), + ), + 'br' => array(), + ); + + return wp_kses( $value, $allowed_html ); + } + private function encode( $value ) { if ( is_array( $value ) ) { return wp_json_encode( $value ); -- cgit v1.2.3