Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#49121 closed defect (bug) (worksforme)

Decode more HTML entities for the blogname sent in an email

Reported by: jensdavidsson's profile 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 5 years ago.
aa saved.png (282.6 KB) - added by zieladam 5 years ago.
Zrzut ekranu 2020-03-5 o 09.36.01.png (36.1 KB) - added by zieladam 5 years ago.

Download all attachments as: .zip

Change History (6)

@jensdavidsson
5 years ago

#1 @jensdavidsson
5 years 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
5 years 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 5 years ago by zieladam (previous) (diff)

@zieladam
5 years ago

#3 @zieladam
5 years ago

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