Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion providers/class.two-factor-email.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public function generate_and_email_token( $user ) {
$token = $this->generate_token( $user->ID );

/* translators: %s: site name */
$subject = wp_strip_all_tags( sprintf( __( 'Your login confirmation code for %s', 'two-factor' ), get_bloginfo( 'name' ) ) );
$subject = wp_strip_all_tags( sprintf( __( 'Your login confirmation code for %s', 'two-factor' ), mb_encode_mimeheader( get_option( 'blogname' ), ENT_QUOTES ) ) );
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about html_entity_decode()? Looks fine if it works as expected though.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd defer to @ajvillegas on whether that was tried or not. wp_specialchars_decode which the upstream uses definitely does not fix it, so I would guess that the more specific function here is likely necessary.

/* translators: %s: token */
$message = wp_strip_all_tags( sprintf( __( 'Enter %s to log in.', 'two-factor' ), $token ) );

Expand Down