WordPress.org

Make WordPress Core

Ticket #9913: 9913.4.diff

File 9913.4.diff, 605 bytes (added by Speedboxer, 6 years ago)

Use UTF-8 as charset in html_entity_decode() to support non-English quotes

  • wp-includes/pluggable.php

     
    337337                } 
    338338        } 
    339339 
     340        if ( !isset( $content_type ) || $content_type = 'text/plain' ) { 
     341                // Ensure we don't send encoded quotes in plain text emails 
     342                $subject = html_entity_decode( $subject, ENT_QUOTES, 'UTF-8' ); 
     343                $message = html_entity_decode( $message, ENT_QUOTES, 'UTF-8' ); 
     344        } 
     345 
    340346        // Empty out the values that may be set 
    341347        $phpmailer->ClearAddresses(); 
    342348        $phpmailer->ClearAllRecipients();