WordPress.org

Make WordPress Core

Opened 10 months ago

Closed 8 months ago

#49121 closed defect (bug) (worksforme)

Decode more HTML entities for the blogname sent in an email

Reported by: jensdavidsson Owned by:
Milestone: Priority: normal
Severity: minor Version: 5.4
Component: Mail Keywords: reporter-feedback
Focuses: Cc:

Description

This concerns newly-registered users that are receiving email notifications.

The function wp_new_user_notification() should take more HTML entities in consideration when decoding the blogname value.

Attachments (3)

49121.diff (610 bytes) - added by jensdavidsson 10 months ago.
aa saved.png (282.6 KB) - added by zieladam 8 months ago.
Zrzut ekranu 2020-03-5 o 09.36.01.png (36.1 KB) - added by zieladam 8 months ago.

Download all attachments as: .zip

Change History (6)

#1 @jensdavidsson
10 months ago

How to reproduce the bug

Set the blogname to something that contains the special character ä. That same character will be encoded to ä when saved, but not properly decoded when sent in the email.

#2 @zieladam
8 months ago

  • Keywords reporter-feedback added

Welcome @jensdavidsson and thank you for reporting!

I followed your instructions and set my site title to “My WP Site ää”:

https://core.trac.wordpress.org/raw-attachment/ticket/49121/aa%20saved.png

Then I checked how it is stored in the database, and I found it’s not encoded to ä. Instead, it’s just a regular character:

https://core.trac.wordpress.org/raw-attachment/ticket/49121/Zrzut%20ekranu%202020-03-5%20o%2009.36.01.png

Then I went on and attempted to create an account, and the email I got got a subject like “[My WP Site ää] Login Details” which is correct. I’m testing on vanilla WordPress 5.3.2.

This makes me think the problem may be not in sending emails, but in the way the site title is stored on your site. Would you mind elaborating a bit more on how did you run into this problem? E.g. Which WordPress version do you use? Do you have any plugins installed? How did you check ä is being encoded as ä in the database?

Last edited 8 months ago by zieladam (previous) (diff)

@zieladam
8 months ago

#3 @zieladam
8 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.