Make WordPress Core

#56964 closed defect (bug) (fixed)

Automatic update emails have HTML entities in plugin/theme names

Reported by: paulschreiber's profile paulschreiber Owned by: audrasjb's profile audrasjb
Milestone: 6.2 Priority: normal
Severity: normal Version: 6.0.3
Component: Mail Keywords: has-patch has-screenshots
Focuses: administration Cc:

Description

Automatic update emails have HTML entities in plugin/theme names.

Example:

These plugins are now up to date:
- Health Check & Troubleshooting (from version 1.5.0 to 1.5.1)
- WP Super Cache (from version 1.9 to 1.9.1)

Attachments (3)

Pasted_Image_11_2_22__12_38_PM.png (180.8 KB) - added by paulschreiber 19 months ago.
update email screen shot
56964.patch (2.7 KB) - added by sanketchodavadiya 16 months ago.
Added html_entity_decode() to all required places where plugin/theme name is used for email.
Capture d’écran 2023-02-23 à 10.44.24.png (150.3 KB) - added by audrasjb 15 months ago.
After patch: emails are correctly encoded

Download all attachments as: .zip

Change History (14)

@paulschreiber
19 months ago

update email screen shot

#1 @audrasjb
19 months ago

  • Milestone changed from Awaiting Review to 6.2

Thanks for spotting this!

Moving for 6.1.1 consideration.
If we have a patch quickly, I think we could even move it to the next minor.

#2 @benjgrolleau
19 months ago

Hello there !
Maybe a simple html_entity_decode can do the job ?

If it's the right way to fix it, I can do it this PM.

Have a great day !

#3 @audrasjb
16 months ago

  • Keywords needs-patch added

Hey @benjgrolleau, sorry for the delay!
html_entity_decode may do the job, let's put together a patch and test it :)

@sanketchodavadiya
16 months ago

Added html_entity_decode() to all required places where plugin/theme name is used for email.

#4 @sanketchodavadiya
16 months ago

  • Keywords has-patch needs-testing added; needs-patch removed

#5 @robinwpdeveloper
16 months ago

In wordpress-develop/src/wp-admin/includes/class-wp-automatic-updater.php
Found few functions containing mail feature:

  • send_debug_email
  • send_plugin_theme_email

If we consider send_plugin_theme_email only for this ticket then:
✅ all occurrences (plugin and theme name) are addressed properly with html_entity_decode.

Note: I couldn't test the email.

This ticket was mentioned in Slack in #core-test by robinwpdeveloper. View the logs.


16 months ago

#7 @paulamit
16 months ago

I have searched with Plugin name and found 5 occurrences. 4 of them are in the send_plugin_theme_email method.

I have searched with Theme name and found 5 occurrences. 4 of them are in the send_plugin_theme_email method.

✅ After applying the patch all 4 occurrences are addressed.

I couldn’t test the auto-generated email.

#8 @audrasjb
16 months ago

Thanks for the testing reports, but we still need to ensure the actual email is ok.

@audrasjb
15 months ago

After patch: emails are correctly encoded

#9 @audrasjb
15 months ago

  • Keywords has-screenshots added; needs-testing removed

I tested the patch on a live website, and it worked on my side.

Self assigning for commit.

#10 @audrasjb
15 months ago

  • Owner set to audrasjb
  • Status changed from new to accepted

#11 @audrasjb
15 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 55411:

Mail: Fix character encoding issues in Plugin/Theme background update emails.

This changeset fixes encoding issues in background update emails by applying html_entity_decode() on Plugin/Theme names in send_plugin_theme_email().

Props paulschreiber, audrasjb, benjgrolleau, sanketchodavadiya, robinwpdeveloper, paulamit.
Fixes #56964.

Note: See TracTickets for help on using tickets.