Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#56964 closed defect (bug) (fixed)

Automatic update emails have HTML entities in plugin/theme names

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

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 4 years ago.
update email screen shot
56964.patch​ (2.7 KB ) - added by sanketchodavadiya 4 years 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 4 years ago.
After patch: emails are correctly encoded

Download all attachments as: .zip

Change History (14)

@paulschreiber
4 years ago

update email screen shot

#1 @audrasjb
4 years ago

  • Milestone Awaiting Review → 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
4 years 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
4 years 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
4 years ago

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

#4 @sanketchodavadiya
4 years ago

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

#5 @robinwpdeveloper
4 years 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.


4 years ago

#7 @paulamit
4 years 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
4 years ago

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

@audrasjb
4 years ago

After patch: emails are correctly encoded

#9 @audrasjb
4 years 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
4 years ago

  • Owner set to audrasjb
  • Status new → accepted

#11 @audrasjb
4 years ago

  • Resolution → fixed
  • Status accepted → 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.