awesomemotive / wp-mail-logging

:envelope: Logs each email sent by WordPress.
48 stars 25 forks source link

Escape the subject #180

Closed donmhico closed 1 year ago

donmhico commented 1 year ago

Description

This PR fixes the issue where the Subject renders HTML such as <img> tag and other HTML tags that are allowed in wp_kses_post()

Testing procedure

  1. Send an email thru your WordPress (using wp_mail()) with the subject containing <img> tag.
  2. Navigate to your Dashboard -> WP Mail Logging -> Email Logs. You should see the string literal of the <img tag instead of the browser actually rendering the image.

Screenshots

Screen Shot 2023-06-19 at 17 04 56 Screen Shot 2023-06-19 at 17 05 56